forked from OSchip/llvm-project
0d3a2b4c66
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 |
||
---|---|---|
.. | ||
Inputs | ||
pp-trace-conditional.cpp | ||
pp-trace-filter.cpp | ||
pp-trace-ident.cpp | ||
pp-trace-include.cpp | ||
pp-trace-macro.cpp | ||
pp-trace-modules.cpp | ||
pp-trace-pragma-general.cpp | ||
pp-trace-pragma-ms.cpp | ||
pp-trace-pragma-opencl.cpp |