clang 20.0.0git
|
ASTConsumer - This is an abstract interface that should be implemented by clients that read ASTs. More...
#include "clang/AST/ASTConsumer.h"
Public Member Functions | |
ASTConsumer ()=default | |
virtual | ~ASTConsumer () |
virtual void | Initialize (ASTContext &Context) |
Initialize - This is called to initialize the consumer, providing the ASTContext. | |
virtual bool | HandleTopLevelDecl (DeclGroupRef D) |
HandleTopLevelDecl - Handle the specified top-level declaration. | |
virtual void | HandleInlineFunctionDefinition (FunctionDecl *D) |
This callback is invoked each time an inline (method or friend) function definition in a class is completed. | |
virtual void | HandleInterestingDecl (DeclGroupRef D) |
HandleInterestingDecl - Handle the specified interesting declaration. | |
virtual void | HandleTranslationUnit (ASTContext &Ctx) |
HandleTranslationUnit - This method is called when the ASTs for entire translation unit have been parsed. | |
virtual void | HandleTagDeclDefinition (TagDecl *D) |
HandleTagDeclDefinition - This callback is invoked each time a TagDecl (e.g. | |
virtual void | HandleTagDeclRequiredDefinition (const TagDecl *D) |
This callback is invoked the first time each TagDecl is required to be complete. | |
virtual void | HandleCXXImplicitFunctionInstantiation (FunctionDecl *D) |
Invoked when a function is implicitly instantiated. | |
virtual void | HandleTopLevelDeclInObjCContainer (DeclGroupRef D) |
Handle the specified top-level declaration that occurred inside and ObjC container. | |
virtual void | HandleImplicitImportDecl (ImportDecl *D) |
Handle an ImportDecl that was implicitly created due to an inclusion directive. | |
virtual void | CompleteTentativeDefinition (VarDecl *D) |
CompleteTentativeDefinition - Callback invoked at the end of a translation unit to notify the consumer that the given tentative definition should be completed. | |
virtual void | CompleteExternalDeclaration (DeclaratorDecl *D) |
CompleteExternalDeclaration - Callback invoked at the end of a translation unit to notify the consumer that the given external declaration should be completed. | |
virtual void | AssignInheritanceModel (CXXRecordDecl *RD) |
Callback invoked when an MSInheritanceAttr has been attached to a CXXRecordDecl. | |
virtual void | HandleCXXStaticMemberVarInstantiation (VarDecl *D) |
HandleCXXStaticMemberVarInstantiation - Tell the consumer that this. | |
virtual void | HandleVTable (CXXRecordDecl *RD) |
Callback involved at the end of a translation unit to notify the consumer that a vtable for the given C++ class is required. | |
virtual ASTMutationListener * | GetASTMutationListener () |
If the consumer is interested in entities getting modified after their initial creation, it should return a pointer to an ASTMutationListener here. | |
virtual ASTDeserializationListener * | GetASTDeserializationListener () |
If the consumer is interested in entities being deserialized from AST files, it should return a pointer to a ASTDeserializationListener here. | |
virtual void | PrintStats () |
PrintStats - If desired, print any statistics. | |
virtual bool | shouldSkipFunctionBody (Decl *D) |
This callback is called for each function if the Parser was initialized with SkipFunctionBodies set to true . | |
Friends | |
class | SemaConsumer |
ASTConsumer - This is an abstract interface that should be implemented by clients that read ASTs.
This abstraction layer allows the client to be independent of the AST producer (e.g. parser vs AST dump file reader, etc).
Definition at line 34 of file ASTConsumer.h.
|
default |
|
inlinevirtual |
Definition at line 44 of file ASTConsumer.h.
|
inlinevirtual |
Callback invoked when an MSInheritanceAttr has been attached to a CXXRecordDecl.
Reimplemented in clang::MultiplexConsumer, clang::BackendConsumer, and clang::IncrementalASTConsumer.
Definition at line 113 of file ASTConsumer.h.
Referenced by clang::Sema::ActOnExplicitInstantiation(), assignInheritanceModel(), handleMSInheritanceAttr(), and mergeDeclAttribute().
|
inlinevirtual |
CompleteExternalDeclaration - Callback invoked at the end of a translation unit to notify the consumer that the given external declaration should be completed.
Reimplemented in clang::MultiplexConsumer, clang::BackendConsumer, and clang::IncrementalASTConsumer.
Definition at line 109 of file ASTConsumer.h.
Referenced by clang::Sema::ActOnEndOfTranslationUnit().
|
inlinevirtual |
CompleteTentativeDefinition - Callback invoked at the end of a translation unit to notify the consumer that the given tentative definition should be completed.
The variable declaration itself will be a tentative definition. If it had an incomplete array type, its type will have already been changed to an array of size 1. However, the declaration remains a tentative definition and has not been modified by the introduction of an implicit zero initializer.
Reimplemented in clang::MultiplexConsumer, clang::BackendConsumer, and clang::IncrementalASTConsumer.
Definition at line 104 of file ASTConsumer.h.
Referenced by clang::Sema::ActOnEndOfTranslationUnit().
|
inlinevirtual |
If the consumer is interested in entities being deserialized from AST files, it should return a pointer to a ASTDeserializationListener here.
Reimplemented in clang::MultiplexConsumer, clang::PCHGenerator, and clang::IncrementalASTConsumer.
Definition at line 133 of file ASTConsumer.h.
|
inlinevirtual |
If the consumer is interested in entities getting modified after their initial creation, it should return a pointer to an ASTMutationListener here.
Reimplemented in clang::MultiplexConsumer, clang::PCHGenerator, and clang::IncrementalASTConsumer.
Definition at line 129 of file ASTConsumer.h.
Referenced by clang::Sema::getASTMutationListener().
|
inlinevirtual |
Invoked when a function is implicitly instantiated.
Note that at this point it does not have a body, its body is instantiated at the end of the translation unit and passed to HandleTopLevelDecl.
Reimplemented in clang::MultiplexConsumer, and clang::IncrementalASTConsumer.
Definition at line 83 of file ASTConsumer.h.
Referenced by clang::Sema::MarkFunctionReferenced().
|
inlinevirtual |
HandleCXXStaticMemberVarInstantiation - Tell the consumer that this.
Reimplemented in clang::IncrementalASTConsumer, clang::MultiplexConsumer, and clang::BackendConsumer.
Definition at line 117 of file ASTConsumer.h.
Referenced by clang::Sema::InstantiateVariableDefinition().
|
virtual |
Handle an ImportDecl that was implicitly created due to an inclusion directive.
The default implementation passes it to HandleTopLevelDecl.
Reimplemented in clang::MultiplexConsumer, and clang::IncrementalASTConsumer.
Definition at line 28 of file ASTConsumer.cpp.
References D, and HandleTopLevelDecl().
Referenced by clang::Sema::BuildModuleInclude(), and clang::Sema::createImplicitModuleImportForErrorRecovery().
|
inlinevirtual |
This callback is invoked each time an inline (method or friend) function definition in a class is completed.
Reimplemented in clang::MultiplexConsumer, clang::BackendConsumer, and clang::IncrementalASTConsumer.
Definition at line 58 of file ASTConsumer.h.
Referenced by clang::Sema::ActOnFinishInlineFunctionDef().
|
virtual |
HandleInterestingDecl - Handle the specified interesting declaration.
This is called by the AST reader when deserializing things that might interest the consumer. The default implementation forwards to HandleTopLevelDecl.
Reimplemented in clang::MultiplexConsumer, clang::BackendConsumer, and clang::IncrementalASTConsumer.
Definition at line 22 of file ASTConsumer.cpp.
References D, and HandleTopLevelDecl().
Referenced by PassObjCImplDeclToConsumer().
|
inlinevirtual |
HandleTagDeclDefinition - This callback is invoked each time a TagDecl (e.g.
struct, union, enum, class) is completed. This allows the client to hack on the type, which can occur at any point in the file (because these can be defined in declspecs).
Reimplemented in clang::MultiplexConsumer, clang::BackendConsumer, and clang::IncrementalASTConsumer.
Definition at line 73 of file ASTConsumer.h.
Referenced by clang::Sema::ActOnTagFinishDefinition(), and clang::Sema::InstantiateClass().
|
inlinevirtual |
This callback is invoked the first time each TagDecl is required to be complete.
Reimplemented in clang::MultiplexConsumer, clang::BackendConsumer, and clang::IncrementalASTConsumer.
Definition at line 77 of file ASTConsumer.h.
Referenced by clang::Sema::RequireCompleteType().
|
virtual |
HandleTopLevelDecl - Handle the specified top-level declaration.
This is called by the parser to process every top-level Decl*.
Reimplemented in clang::MultiplexConsumer, clang::ento::ModelConsumer, clang::BackendConsumer, and clang::IncrementalASTConsumer.
Definition at line 18 of file ASTConsumer.cpp.
Referenced by clang::Sema::ActOnExplicitInstantiation(), clang::Sema::ActOnPragmaDetectMismatch(), clang::Sema::ActOnPragmaMSComment(), clang::ASTMergeAction::ExecuteAction(), HandleImplicitImportDecl(), HandleInterestingDecl(), clang::Sema::InstantiateClassMembers(), clang::Sema::InstantiateFunctionDefinition(), clang::ParseAST(), and ReferenceDllExportedMembers().
|
virtual |
Handle the specified top-level declaration that occurred inside and ObjC container.
The default implementation ignored them.
Reimplemented in clang::MultiplexConsumer, and clang::IncrementalASTConsumer.
Definition at line 26 of file ASTConsumer.cpp.
Referenced by clang::SemaObjC::ActOnAtEnd().
|
inlinevirtual |
HandleTranslationUnit - This method is called when the ASTs for entire translation unit have been parsed.
Reimplemented in clang::installapi::InstallAPIVisitor, clang::BackendConsumer, clang::tooling::RenamingASTConsumer, clang::tooling::USRSymbolRenamer, clang::tooling::RefactoringASTConsumer, clang::MultiplexConsumer, clang::PCHGenerator, clang::CXX20ModulesGenerator, and clang::IncrementalASTConsumer.
Definition at line 67 of file ASTConsumer.h.
Referenced by clang::ParseAST().
|
inlinevirtual |
Callback involved at the end of a translation unit to notify the consumer that a vtable for the given C++ class is required.
RD | The class whose vtable was used. |
Reimplemented in clang::MultiplexConsumer, clang::PCHGenerator, clang::BackendConsumer, and clang::IncrementalASTConsumer.
Definition at line 124 of file ASTConsumer.h.
Referenced by clang::Sema::DefineUsedVTables().
|
inlinevirtual |
Initialize - This is called to initialize the consumer, providing the ASTContext.
Reimplemented in clang::MultiplexConsumer, and clang::BackendConsumer.
Definition at line 48 of file ASTConsumer.h.
Referenced by clang::CompilerInstance::setASTConsumer(), and clang::CompilerInstance::setASTContext().
|
inlinevirtual |
PrintStats - If desired, print any statistics.
Reimplemented in clang::MultiplexConsumer, and clang::IncrementalASTConsumer.
Definition at line 138 of file ASTConsumer.h.
Referenced by clang::ParseAST().
This callback is called for each function if the Parser was initialized with SkipFunctionBodies
set to true
.
true
if the function's body should be skipped. The function body may be parsed anyway if it is needed (for instance, if it contains the code completion point or is constexpr). Reimplemented in clang::MultiplexConsumer, and clang::IncrementalASTConsumer.
Definition at line 146 of file ASTConsumer.h.
Referenced by clang::Sema::canSkipFunctionBody().
|
friend |
Definition at line 39 of file ASTConsumer.h.