clang 20.0.0git
Public Member Functions | Static Public Member Functions | List of all members
clang::IncrementalASTConsumer Class Referencefinal
Inheritance diagram for clang::IncrementalASTConsumer:
Inheritance graph
[legend]

Public Member Functions

 IncrementalASTConsumer (Interpreter &InterpRef, std::unique_ptr< ASTConsumer > C)
 
bool HandleTopLevelDecl (DeclGroupRef DGR) override final
 HandleTopLevelDecl - Handle the specified top-level declaration.
 
void HandleTranslationUnit (ASTContext &Ctx) override final
 HandleTranslationUnit - This method is called when the ASTs for entire translation unit have been parsed.
 
void HandleInlineFunctionDefinition (FunctionDecl *D) override final
 This callback is invoked each time an inline (method or friend) function definition in a class is completed.
 
void HandleInterestingDecl (DeclGroupRef D) override final
 HandleInterestingDecl - Handle the specified interesting declaration.
 
void HandleTagDeclDefinition (TagDecl *D) override final
 HandleTagDeclDefinition - This callback is invoked each time a TagDecl (e.g.
 
void HandleTagDeclRequiredDefinition (const TagDecl *D) override final
 This callback is invoked the first time each TagDecl is required to be complete.
 
void HandleCXXImplicitFunctionInstantiation (FunctionDecl *D) override final
 Invoked when a function is implicitly instantiated.
 
void HandleTopLevelDeclInObjCContainer (DeclGroupRef D) override final
 Handle the specified top-level declaration that occurred inside and ObjC container.
 
void HandleImplicitImportDecl (ImportDecl *D) override final
 Handle an ImportDecl that was implicitly created due to an inclusion directive.
 
void CompleteTentativeDefinition (VarDecl *D) override final
 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 final
 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 final
 Callback invoked when an MSInheritanceAttr has been attached to a CXXRecordDecl.
 
void HandleCXXStaticMemberVarInstantiation (VarDecl *D) override final
 HandleCXXStaticMemberVarInstantiation - Tell the consumer that this.
 
void HandleVTable (CXXRecordDecl *RD) override final
 Callback involved at the end of a translation unit to notify the consumer that a vtable for the given C++ class is required.
 
ASTMutationListenerGetASTMutationListener () override final
 If the consumer is interested in entities getting modified after their initial creation, it should return a pointer to an ASTMutationListener here.
 
ASTDeserializationListenerGetASTDeserializationListener () override final
 If the consumer is interested in entities being deserialized from AST files, it should return a pointer to a ASTDeserializationListener here.
 
void PrintStats () override final
 PrintStats - If desired, print any statistics.
 
bool shouldSkipFunctionBody (Decl *D) override final
 This callback is called for each function if the Parser was initialized with SkipFunctionBodies set to true.
 
- Public Member Functions inherited from clang::ASTConsumer
 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 ASTMutationListenerGetASTMutationListener ()
 If the consumer is interested in entities getting modified after their initial creation, it should return a pointer to an ASTMutationListener here.
 
virtual ASTDeserializationListenerGetASTDeserializationListener ()
 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.
 

Static Public Member Functions

static bool classof (const clang::ASTConsumer *)
 

Detailed Description

Definition at line 34 of file IncrementalParser.cpp.

Constructor & Destructor Documentation

◆ IncrementalASTConsumer()

clang::IncrementalASTConsumer::IncrementalASTConsumer ( Interpreter InterpRef,
std::unique_ptr< ASTConsumer C 
)
inline

Definition at line 39 of file IncrementalParser.cpp.

Member Function Documentation

◆ AssignInheritanceModel()

void clang::IncrementalASTConsumer::AssignInheritanceModel ( CXXRecordDecl RD)
inlinefinaloverridevirtual

Callback invoked when an MSInheritanceAttr has been attached to a CXXRecordDecl.

Reimplemented from clang::ASTConsumer.

Definition at line 85 of file IncrementalParser.cpp.

◆ classof()

static bool clang::IncrementalASTConsumer::classof ( const clang::ASTConsumer )
inlinestatic

Definition at line 104 of file IncrementalParser.cpp.

◆ CompleteExternalDeclaration()

void clang::IncrementalASTConsumer::CompleteExternalDeclaration ( DeclaratorDecl D)
inlinefinaloverridevirtual

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 82 of file IncrementalParser.cpp.

References D.

◆ CompleteTentativeDefinition()

void clang::IncrementalASTConsumer::CompleteTentativeDefinition ( VarDecl D)
inlinefinaloverridevirtual

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 79 of file IncrementalParser.cpp.

References D.

◆ GetASTDeserializationListener()

ASTDeserializationListener * clang::IncrementalASTConsumer::GetASTDeserializationListener ( )
inlinefinaloverridevirtual

If the consumer is interested in entities being deserialized from AST files, it should return a pointer to a ASTDeserializationListener here.

Reimplemented from clang::ASTConsumer.

Definition at line 97 of file IncrementalParser.cpp.

◆ GetASTMutationListener()

ASTMutationListener * clang::IncrementalASTConsumer::GetASTMutationListener ( )
inlinefinaloverridevirtual

If the consumer is interested in entities getting modified after their initial creation, it should return a pointer to an ASTMutationListener here.

Reimplemented from clang::ASTConsumer.

Definition at line 94 of file IncrementalParser.cpp.

◆ HandleCXXImplicitFunctionInstantiation()

void clang::IncrementalASTConsumer::HandleCXXImplicitFunctionInstantiation ( FunctionDecl D)
inlinefinaloverridevirtual

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 70 of file IncrementalParser.cpp.

References D.

◆ HandleCXXStaticMemberVarInstantiation()

void clang::IncrementalASTConsumer::HandleCXXStaticMemberVarInstantiation ( VarDecl D)
inlinefinaloverridevirtual

HandleCXXStaticMemberVarInstantiation - Tell the consumer that this.

Reimplemented from clang::ASTConsumer.

Definition at line 88 of file IncrementalParser.cpp.

References D.

◆ HandleImplicitImportDecl()

void clang::IncrementalASTConsumer::HandleImplicitImportDecl ( ImportDecl D)
inlinefinaloverridevirtual

Handle an ImportDecl that was implicitly created due to an inclusion directive.

The default implementation passes it to HandleTopLevelDecl.

Reimplemented from clang::ASTConsumer.

Definition at line 76 of file IncrementalParser.cpp.

References D.

◆ HandleInlineFunctionDefinition()

void clang::IncrementalASTConsumer::HandleInlineFunctionDefinition ( FunctionDecl D)
inlinefinaloverridevirtual

This callback is invoked each time an inline (method or friend) function definition in a class is completed.

Reimplemented from clang::ASTConsumer.

Definition at line 58 of file IncrementalParser.cpp.

References D.

◆ HandleInterestingDecl()

void clang::IncrementalASTConsumer::HandleInterestingDecl ( DeclGroupRef  D)
inlinefinaloverridevirtual

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 61 of file IncrementalParser.cpp.

References D.

◆ HandleTagDeclDefinition()

void clang::IncrementalASTConsumer::HandleTagDeclDefinition ( TagDecl D)
inlinefinaloverridevirtual

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 64 of file IncrementalParser.cpp.

References D.

◆ HandleTagDeclRequiredDefinition()

void clang::IncrementalASTConsumer::HandleTagDeclRequiredDefinition ( const TagDecl D)
inlinefinaloverridevirtual

This callback is invoked the first time each TagDecl is required to be complete.

Reimplemented from clang::ASTConsumer.

Definition at line 67 of file IncrementalParser.cpp.

References D.

◆ HandleTopLevelDecl()

bool clang::IncrementalASTConsumer::HandleTopLevelDecl ( DeclGroupRef  D)
inlinefinaloverridevirtual

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 from clang::ASTConsumer.

Definition at line 42 of file IncrementalParser.cpp.

References D.

◆ HandleTopLevelDeclInObjCContainer()

void clang::IncrementalASTConsumer::HandleTopLevelDeclInObjCContainer ( DeclGroupRef  D)
inlinefinaloverridevirtual

Handle the specified top-level declaration that occurred inside and ObjC container.

The default implementation ignored them.

Reimplemented from clang::ASTConsumer.

Definition at line 73 of file IncrementalParser.cpp.

References D.

◆ HandleTranslationUnit()

void clang::IncrementalASTConsumer::HandleTranslationUnit ( ASTContext Ctx)
inlinefinaloverridevirtual

HandleTranslationUnit - This method is called when the ASTs for entire translation unit have been parsed.

Reimplemented from clang::ASTConsumer.

Definition at line 55 of file IncrementalParser.cpp.

◆ HandleVTable()

void clang::IncrementalASTConsumer::HandleVTable ( CXXRecordDecl RD)
inlinefinaloverridevirtual

Callback involved at the end of a translation unit to notify the consumer that a vtable for the given C++ class is required.

Parameters
RDThe class whose vtable was used.

Reimplemented from clang::ASTConsumer.

Definition at line 91 of file IncrementalParser.cpp.

◆ PrintStats()

void clang::IncrementalASTConsumer::PrintStats ( )
inlinefinaloverridevirtual

PrintStats - If desired, print any statistics.

Reimplemented from clang::ASTConsumer.

Definition at line 100 of file IncrementalParser.cpp.

◆ shouldSkipFunctionBody()

bool clang::IncrementalASTConsumer::shouldSkipFunctionBody ( Decl D)
inlinefinaloverridevirtual

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 101 of file IncrementalParser.cpp.

References D.


The documentation for this class was generated from the following file: