clang: clang::MultiplexConsumer Class Reference (original) (raw)
#include "[clang/Frontend/MultiplexConsumer.h](MultiplexConsumer%5F8h%5Fsource.html)"
Public Member Functions | |
---|---|
MultiplexConsumer (std::vector< std::unique_ptr< ASTConsumer > > C) | |
MultiplexConsumer (std::unique_ptr< ASTConsumer > C) | |
~MultiplexConsumer () override | |
void | Initialize (ASTContext &Context) override |
Initialize - This is called to initialize the consumer, providing the ASTContext. | |
void | HandleCXXStaticMemberVarInstantiation (VarDecl *VD) override |
HandleCXXStaticMemberVarInstantiation - Tell the consumer that this. | |
bool | HandleTopLevelDecl (DeclGroupRef D) override |
HandleTopLevelDecl - Handle the specified top-level declaration. | |
void | HandleInlineFunctionDefinition (FunctionDecl *D) override |
This callback is invoked each time an inline (method or friend) function definition in a class is completed. | |
void | HandleInterestingDecl (DeclGroupRef D) override |
HandleInterestingDecl - Handle the specified interesting declaration. | |
void | HandleTranslationUnit (ASTContext &Ctx) override |
HandleTranslationUnit - This method is called when the ASTs for entire translation unit have been parsed. | |
void | HandleTagDeclDefinition (TagDecl *D) override |
HandleTagDeclDefinition - This callback is invoked each time a TagDecl (e.g. | |
void | HandleTagDeclRequiredDefinition (const TagDecl *D) override |
This callback is invoked the first time each TagDecl is required to be complete. | |
void | HandleCXXImplicitFunctionInstantiation (FunctionDecl *D) override |
Invoked when a function is implicitly instantiated. | |
void | HandleTopLevelDeclInObjCContainer (DeclGroupRef D) override |
Handle the specified top-level declaration that occurred inside and ObjC container. | |
void | HandleImplicitImportDecl (ImportDecl *D) override |
Handle an ImportDecl that was implicitly created due to an inclusion directive. | |
void | CompleteTentativeDefinition (VarDecl *D) override |
CompleteTentativeDefinition - Callback invoked at the end of a translation unit to notify the consumer that the given tentative definition should be completed. | |
void | CompleteExternalDeclaration (DeclaratorDecl *D) override |
CompleteExternalDeclaration - Callback invoked at the end of a translation unit to notify the consumer that the given external declaration should be completed. | |
void | AssignInheritanceModel (CXXRecordDecl *RD) override |
Callback invoked when an MSInheritanceAttr has been attached to a CXXRecordDecl. | |
void | HandleVTable (CXXRecordDecl *RD) override |
Callback involved at the end of a translation unit to notify the consumer that a vtable for the given C++ class is required. | |
ASTMutationListener * | GetASTMutationListener () override |
If the consumer is interested in entities getting modified after their initial creation, it should return a pointer to an ASTMutationListener here. | |
ASTDeserializationListener * | GetASTDeserializationListener () override |
If the consumer is interested in entities being deserialized from AST files, it should return a pointer to a ASTDeserializationListener here. | |
void | PrintStats () override |
PrintStats - If desired, print any statistics. | |
bool | shouldSkipFunctionBody (Decl *D) override |
This callback is called for each function if the Parser was initialized with SkipFunctionBodies set to true. | |
void | InitializeSema (Sema &S) override |
Initialize the semantic consumer with the Sema instance being used to perform semantic analysis on the abstract syntax tree. | |
void | ForgetSema () override |
Inform the semantic consumer that Sema is no longer available. | |
![]() |
|
SemaConsumer () | |
virtual void | InitializeSema (Sema &S) |
Initialize the semantic consumer with the Sema instance being used to perform semantic analysis on the abstract syntax tree. | |
virtual void | ForgetSema () |
Inform the semantic consumer that Sema is no longer available. | |
![]() |
|
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. | |
Protected Attributes | |
---|---|
std::vector< std::unique_ptr< ASTConsumer > > | Consumers |
std::unique_ptr< MultiplexASTMutationListener > | MutationListener |
std::unique_ptr< MultiplexASTDeserializationListener > | DeserializationListener |
Definition at line 52 of file MultiplexConsumer.h.
MultiplexConsumer::MultiplexConsumer | ( | std::vector< std::unique_ptr< ASTConsumer > > | C | ) |
---|
◆ MultiplexConsumer() [2/2]
MultiplexConsumer::MultiplexConsumer | ( | std::unique_ptr< ASTConsumer > | C | ) |
---|
◆ ~MultiplexConsumer()
MultiplexConsumer::~MultiplexConsumer ( ) | override |
---|
◆ AssignInheritanceModel()
void MultiplexConsumer::AssignInheritanceModel ( CXXRecordDecl * RD) | overridevirtual |
---|
◆ CompleteExternalDeclaration()
void MultiplexConsumer::CompleteExternalDeclaration ( DeclaratorDecl * D) | overridevirtual |
---|
CompleteExternalDeclaration - Callback invoked at the end of a translation unit to notify the consumer that the given external declaration should be completed.
Reimplemented from clang::ASTConsumer.
Definition at line 372 of file MultiplexConsumer.cpp.
◆ CompleteTentativeDefinition()
void MultiplexConsumer::CompleteTentativeDefinition ( VarDecl * D) | overridevirtual |
---|
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 from clang::ASTConsumer.
Definition at line 367 of file MultiplexConsumer.cpp.
◆ ForgetSema()
void MultiplexConsumer::ForgetSema ( ) | overridevirtual |
---|
◆ GetASTDeserializationListener()
◆ GetASTMutationListener()
◆ HandleCXXImplicitFunctionInstantiation()
void MultiplexConsumer::HandleCXXImplicitFunctionInstantiation ( FunctionDecl * D) | overridevirtual |
---|
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 from clang::ASTConsumer.
Definition at line 352 of file MultiplexConsumer.cpp.
◆ HandleCXXStaticMemberVarInstantiation()
void MultiplexConsumer::HandleCXXStaticMemberVarInstantiation ( VarDecl * D) | overridevirtual |
---|
◆ HandleImplicitImportDecl()
void MultiplexConsumer::HandleImplicitImportDecl ( ImportDecl * D) | overridevirtual |
---|
◆ HandleInlineFunctionDefinition()
void MultiplexConsumer::HandleInlineFunctionDefinition ( FunctionDecl * D) | overridevirtual |
---|
◆ HandleInterestingDecl()
void MultiplexConsumer::HandleInterestingDecl ( DeclGroupRef D) | overridevirtual |
---|
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 from clang::ASTConsumer.
Definition at line 332 of file MultiplexConsumer.cpp.
◆ HandleTagDeclDefinition()
void MultiplexConsumer::HandleTagDeclDefinition ( TagDecl * D) | overridevirtual |
---|
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 from clang::ASTConsumer.
Definition at line 342 of file MultiplexConsumer.cpp.
◆ HandleTagDeclRequiredDefinition()
void MultiplexConsumer::HandleTagDeclRequiredDefinition ( const TagDecl * D) | overridevirtual |
---|
◆ HandleTopLevelDecl()
◆ HandleTopLevelDeclInObjCContainer()
void MultiplexConsumer::HandleTopLevelDeclInObjCContainer ( DeclGroupRef D) | overridevirtual |
---|
◆ HandleTranslationUnit()
void MultiplexConsumer::HandleTranslationUnit ( ASTContext & Ctx) | overridevirtual |
---|
◆ HandleVTable()
void MultiplexConsumer::HandleVTable ( CXXRecordDecl * RD) | overridevirtual |
---|
Callback involved at the end of a translation unit to notify the consumer that a vtable for the given C++ class is required.
Parameters
RD | The class whose vtable was used. |
---|
Reimplemented from clang::ASTConsumer.
Definition at line 382 of file MultiplexConsumer.cpp.
References Consumers.
◆ Initialize()
void MultiplexConsumer::Initialize ( ASTContext & Context) | overridevirtual |
---|
◆ InitializeSema()
void MultiplexConsumer::InitializeSema ( Sema & S) | overridevirtual |
---|
◆ PrintStats()
void MultiplexConsumer::PrintStats ( ) | overridevirtual |
---|
◆ shouldSkipFunctionBody()
bool MultiplexConsumer::shouldSkipFunctionBody ( Decl * D) | overridevirtual |
---|
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 from clang::ASTConsumer.
Definition at line 400 of file MultiplexConsumer.cpp.
References Consumers, D, and clang::sema::Skip.
◆ Consumers
std::vector<std::unique_ptr<ASTConsumer> > clang::MultiplexConsumer::Consumers | protected |
---|
Definition at line 85 of file MultiplexConsumer.h.
Referenced by AssignInheritanceModel(), CompleteExternalDeclaration(), CompleteTentativeDefinition(), ForgetSema(), HandleCXXImplicitFunctionInstantiation(), HandleCXXStaticMemberVarInstantiation(), HandleImplicitImportDecl(), HandleInlineFunctionDefinition(), HandleInterestingDecl(), HandleTagDeclDefinition(), HandleTagDeclRequiredDefinition(), HandleTopLevelDecl(), HandleTopLevelDeclInObjCContainer(), HandleTranslationUnit(), HandleVTable(), Initialize(), InitializeSema(), MultiplexConsumer(), PrintStats(), and shouldSkipFunctionBody().
◆ DeserializationListener
◆ MutationListener
The documentation for this class was generated from the following files:
- include/clang/Frontend/MultiplexConsumer.h
- lib/Frontend/MultiplexConsumer.cpp