clang: clang::ASTConsumer Class Reference (original) (raw)
ASTConsumer - This is an abstract interface that should be implemented by clients that read ASTs. More...
#include "[clang/AST/ASTConsumer.h](ASTConsumer%5F8h%5Fsource.html)"
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. | |
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.
clang::ASTConsumer::ASTConsumer ( ) | default |
---|
◆ ~ASTConsumer()
virtual clang::ASTConsumer::~ASTConsumer ( ) | inlinevirtual |
---|
◆ AssignInheritanceModel()
virtual void clang::ASTConsumer::AssignInheritanceModel ( CXXRecordDecl * RD) | inlinevirtual |
---|
◆ CompleteExternalDeclaration()
virtual void clang::ASTConsumer::CompleteExternalDeclaration ( DeclaratorDecl * D) | inlinevirtual |
---|
◆ CompleteTentativeDefinition()
virtual void clang::ASTConsumer::CompleteTentativeDefinition ( VarDecl * D) | 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, and clang::BackendConsumer.
Definition at line 104 of file ASTConsumer.h.
Referenced by clang::Sema::ActOnEndOfTranslationUnit().
◆ GetASTDeserializationListener()
◆ GetASTMutationListener()
◆ HandleCXXImplicitFunctionInstantiation()
virtual void clang::ASTConsumer::HandleCXXImplicitFunctionInstantiation ( FunctionDecl * D) | inlinevirtual |
---|
◆ HandleCXXStaticMemberVarInstantiation()
virtual void clang::ASTConsumer::HandleCXXStaticMemberVarInstantiation ( VarDecl * D) | inlinevirtual |
---|
◆ HandleImplicitImportDecl()
void ASTConsumer::HandleImplicitImportDecl ( ImportDecl * D) | virtual |
---|
◆ HandleInlineFunctionDefinition()
virtual void clang::ASTConsumer::HandleInlineFunctionDefinition ( FunctionDecl * D) | inlinevirtual |
---|
◆ HandleInterestingDecl()
void ASTConsumer::HandleInterestingDecl ( DeclGroupRef D) | virtual |
---|
◆ HandleTagDeclDefinition()
virtual void clang::ASTConsumer::HandleTagDeclDefinition ( TagDecl * D) | inlinevirtual |
---|
◆ HandleTagDeclRequiredDefinition()
virtual void clang::ASTConsumer::HandleTagDeclRequiredDefinition ( const TagDecl * D) | inlinevirtual |
---|
◆ HandleTopLevelDecl()
HandleTopLevelDecl - Handle the specified top-level declaration.
This is called by the parser to process every top-level Decl*.
Returns
true to continue parsing, or false to abort parsing.
Reimplemented in cir::CIRGenerator, clang::MultiplexConsumer, clang::ento::ModelConsumer, cir::CIRGenConsumer, clang::BackendConsumer, and clang::InProcessPrintingASTConsumer.
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().
◆ HandleTopLevelDeclInObjCContainer()
void ASTConsumer::HandleTopLevelDeclInObjCContainer ( DeclGroupRef D) | virtual |
---|
◆ HandleTranslationUnit()
virtual void clang::ASTConsumer::HandleTranslationUnit ( ASTContext & Ctx) | inlinevirtual |
---|
◆ HandleVTable()
virtual void clang::ASTConsumer::HandleVTable ( CXXRecordDecl * RD) | inlinevirtual |
---|
◆ Initialize()
virtual void clang::ASTConsumer::Initialize ( ASTContext & Context) | inlinevirtual |
---|
◆ PrintStats()
virtual void clang::ASTConsumer::PrintStats ( ) | inlinevirtual |
---|
◆ shouldSkipFunctionBody()
virtual bool clang::ASTConsumer::shouldSkipFunctionBody ( Decl * D) | inlinevirtual |
---|
This callback is called for each function if the Parser was initialized with SkipFunctionBodies
set to true
.
Returns
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.
Definition at line 146 of file ASTConsumer.h.
Referenced by clang::Sema::canSkipFunctionBody().
◆ SemaConsumer
The documentation for this class was generated from the following files:
- include/clang/AST/ASTConsumer.h
- lib/AST/ASTConsumer.cpp