clang-tools 20.0.0git
|
Extension point that allows modules to observe and modify an AST build. More...
#include <FeatureModule.h>
Public Member Functions | |
virtual | ~ASTListener ()=default |
Listeners are destroyed once the AST is built. | |
virtual void | beforeExecute (CompilerInstance &CI) |
Called before every AST build, both for main file and preamble. | |
virtual void | sawDiagnostic (const clang::Diagnostic &, clangd::Diag &) |
Called everytime a diagnostic is encountered. | |
Extension point that allows modules to observe and modify an AST build.
One instance is created each time clangd produces a ParsedAST or PrecompiledPreamble. For a given instance, lifecycle methods are always called on a single thread.
Definition at line 106 of file FeatureModule.h.
|
virtualdefault |
Listeners are destroyed once the AST is built.
|
inlinevirtual |
Called before every AST build, both for main file and preamble.
The call happens immediately before FrontendAction::Execute(), with Preprocessor set up already and after BeginSourceFile() on main file was called.
Definition at line 113 of file FeatureModule.h.
|
inlinevirtual |
Called everytime a diagnostic is encountered.
Modules can use this modify the final diagnostic, or store some information to surface code actions later on.
Definition at line 118 of file FeatureModule.h.