class MultiplexConsumer

Declaration

class MultiplexConsumer : public SemaConsumer { /* full declaration omitted */ };

Description

An abstract interface that should be implemented by clients that read ASTs and then require further semantic analysis of the entities in those ASTs.

Declared at: clang/include/clang/Frontend/MultiplexConsumer.h:51

Inherits from: SemaConsumer

Member Variables

private std::vector<std::unique_ptr<ASTConsumer>> Consumers
private std::unique_ptr<MultiplexASTMutationListener> MutationListener
private std::unique_ptr< MultiplexASTDeserializationListener> DeserializationListener

Method Overview

Inherited from SemaConsumer:

Inherited from ASTConsumer:

Methods

void AssignInheritanceModel(
    clang::CXXRecordDecl* RD)

Description

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

Declared at: clang/include/clang/Frontend/MultiplexConsumer.h:71

Parameters

clang::CXXRecordDecl* RD

void CompleteExternalDeclaration(
    clang::VarDecl* D)

Description

CompleteExternalDeclaration - Callback invoked at the end of a translation unit to notify the consumer that the given external declaration should be completed.

Declared at: clang/include/clang/Frontend/MultiplexConsumer.h:70

Parameters

clang::VarDecl* D

void CompleteTentativeDefinition(
    clang::VarDecl* D)

Description

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.

Declared at: clang/include/clang/Frontend/MultiplexConsumer.h:69

Parameters

clang::VarDecl* D

void ForgetSema()

Description

Inform the semantic consumer that Sema is no longer available.

Declared at: clang/include/clang/Frontend/MultiplexConsumer.h:80

clang::ASTDeserializationListener*
GetASTDeserializationListener()

Description

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

Declared at: clang/include/clang/Frontend/MultiplexConsumer.h:74

clang::ASTMutationListener*
GetASTMutationListener()

Description

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

Declared at: clang/include/clang/Frontend/MultiplexConsumer.h:73

void HandleCXXImplicitFunctionInstantiation(
    clang::FunctionDecl* D)

Description

Invoked when a function is implicitly instantiated. Note that at this point point it does not have a body, its body is instantiated at the end of the translation unit and passed to HandleTopLevelDecl.

Declared at: clang/include/clang/Frontend/MultiplexConsumer.h:66

Parameters

clang::FunctionDecl* D

void HandleCXXStaticMemberVarInstantiation(
    clang::VarDecl* VD)

Description

HandleCXXStaticMemberVarInstantiation - Tell the consumer that this

Declared at: clang/include/clang/Frontend/MultiplexConsumer.h:59

Parameters

clang::VarDecl* VD

void HandleImplicitImportDecl(
    clang::ImportDecl* D)

Description

Handle an ImportDecl that was implicitly created due to an inclusion directive. The default implementation passes it to HandleTopLevelDecl.

Declared at: clang/include/clang/Frontend/MultiplexConsumer.h:68

Parameters

clang::ImportDecl* D

void HandleInlineFunctionDefinition(
    clang::FunctionDecl* D)

Description

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

Declared at: clang/include/clang/Frontend/MultiplexConsumer.h:61

Parameters

clang::FunctionDecl* D

void HandleInterestingDecl(clang::DeclGroupRef D)

Description

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.

Declared at: clang/include/clang/Frontend/MultiplexConsumer.h:62

Parameters

clang::DeclGroupRef D

void HandleTagDeclDefinition(clang::TagDecl* D)

Description

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).

Declared at: clang/include/clang/Frontend/MultiplexConsumer.h:64

Parameters

clang::TagDecl* D

void HandleTagDeclRequiredDefinition(
    const clang::TagDecl* D)

Description

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

Declared at: clang/include/clang/Frontend/MultiplexConsumer.h:65

Parameters

const clang::TagDecl* D

bool HandleTopLevelDecl(clang::DeclGroupRef D)

Description

HandleTopLevelDecl - Handle the specified top-level declaration. This is called by the parser to process every top-level Decl*.

Declared at: clang/include/clang/Frontend/MultiplexConsumer.h:60

Parameters

clang::DeclGroupRef D

Returns

true to continue parsing, or false to abort parsing.

void HandleTopLevelDeclInObjCContainer(
    clang::DeclGroupRef D)

Description

Handle the specified top-level declaration that occurred inside and ObjC container. The default implementation ignored them.

Declared at: clang/include/clang/Frontend/MultiplexConsumer.h:67

Parameters

clang::DeclGroupRef D

void HandleTranslationUnit(clang::ASTContext& Ctx)

Description

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

Declared at: clang/include/clang/Frontend/MultiplexConsumer.h:63

Parameters

clang::ASTContext& Ctx

void HandleVTable(clang::CXXRecordDecl* RD)

Description

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

Declared at: clang/include/clang/Frontend/MultiplexConsumer.h:72

Parameters

clang::CXXRecordDecl* RD
The class whose vtable was used.

void Initialize(clang::ASTContext& Context)

Description

Initialize - This is called to initialize the consumer, providing the ASTContext.

Declared at: clang/include/clang/Frontend/MultiplexConsumer.h:58

Parameters

clang::ASTContext& Context

void InitializeSema(clang::Sema& S)

Description

Initialize the semantic consumer with the Sema instance being used to perform semantic analysis on the abstract syntax tree.

Declared at: clang/include/clang/Frontend/MultiplexConsumer.h:79

Parameters

clang::Sema& S

MultiplexConsumer(
    std::vector<std::unique_ptr<ASTConsumer>> C)

Declared at: clang/include/clang/Frontend/MultiplexConsumer.h:54

Parameters

std::vector<std::unique_ptr<ASTConsumer>> C

void PrintStats()

Description

PrintStats - If desired, print any statistics.

Declared at: clang/include/clang/Frontend/MultiplexConsumer.h:75

bool shouldSkipFunctionBody(clang::Decl* D)

Description

This callback is called for each function if the Parser was initialized with \c SkipFunctionBodies set to \c true.

Declared at: clang/include/clang/Frontend/MultiplexConsumer.h:76

Parameters

clang::Decl* D

Returns

\c 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).

~MultiplexConsumer()

Declared at: clang/include/clang/Frontend/MultiplexConsumer.h:55