clang-tools
10.0.0git
|
Handles PPCallbacks and re-runs preprocessing of the whole translation unit with modules disabled. More...
#include <ExpandModularHeadersPPCallbacks.h>
Classes | |
class | FileRecorder |
Public Member Functions | |
ExpandModularHeadersPPCallbacks (CompilerInstance *Compiler, IntrusiveRefCntPtr< llvm::vfs::OverlayFileSystem > OverlayFS) | |
~ExpandModularHeadersPPCallbacks () | |
Preprocessor * | getPreprocessor () const |
Returns the preprocessor that provides callbacks for the whole translation unit, including the main file, textual headers, and modular headers. More... | |
Handles PPCallbacks and re-runs preprocessing of the whole translation unit with modules disabled.
This way it's possible to get PPCallbacks for the whole translation unit including the contents of the modular headers and all their transitive includes.
This allows existing tools based on PPCallbacks to retain their functionality when running with C++ modules enabled. This only works in the backwards compatible modules mode, i.e. when code can still be parsed in non-modular way.
Definition at line 36 of file ExpandModularHeadersPPCallbacks.h.
clang::tooling::ExpandModularHeadersPPCallbacks::ExpandModularHeadersPPCallbacks | ( | CompilerInstance * | Compiler, |
IntrusiveRefCntPtr< llvm::vfs::OverlayFileSystem > | OverlayFS | ||
) |
Definition at line 54 of file ExpandModularHeadersPPCallbacks.cpp.
References ~ExpandModularHeadersPPCallbacks().
|
default |
Referenced by ExpandModularHeadersPPCallbacks().
Preprocessor * clang::tooling::ExpandModularHeadersPPCallbacks::getPreprocessor | ( | ) | const |
Returns the preprocessor that provides callbacks for the whole translation unit, including the main file, textual headers, and modular headers.
This preprocessor is separate from the one used by the rest of the compiler.
Definition at line 94 of file ExpandModularHeadersPPCallbacks.cpp.
References IsAngled, Loc, clang::doc::MD(), and Range.