llvm/clang-tools-extra/test/pp-trace
Argyrios Kyrtzidis 0d3a2b4c66 [Lex] Introduce PPCallbacks::LexedFileChanged() preprocessor callback
This is a preprocessor callback focused on the lexed file changing, without conflating effects of line number directives and other pragmas.
A client that only cares about what files the lexer processes, like dependency generation, can use this more straightforward
callback instead of `PPCallbacks::FileChanged()`. Clients that want the pragma directive effects as well can keep using `FileChanged()`.

A use case where `PPCallbacks::LexedFileChanged()` is particularly simpler to use than `FileChanged()` is in a situation
where a client wants to keep track of lexed file changes that include changes from/to the predefines buffer, where it becomes
unnecessary complicated trying to use `FileChanged()` while filtering out the pragma directives effects callbacks.

Also take the opportunity to provide information about the prior `FileID` the `Lexer` moved from, even when entering a new file.

Differential Revision: https://reviews.llvm.org/D128947
2022-07-01 14:22:31 -07:00
..
Inputs
pp-trace-conditional.cpp
pp-trace-filter.cpp
pp-trace-ident.cpp
pp-trace-include.cpp [Lex] Introduce PPCallbacks::LexedFileChanged() preprocessor callback 2022-07-01 14:22:31 -07:00
pp-trace-macro.cpp
pp-trace-modules.cpp
pp-trace-pragma-general.cpp
pp-trace-pragma-ms.cpp
pp-trace-pragma-opencl.cpp