clang 20.0.0git
Classes | Public Member Functions | List of all members
clang::index::IndexDataConsumer Class Reference

#include "clang/Index/IndexDataConsumer.h"

Classes

struct  ASTNodeInfo
 

Public Member Functions

virtual ~IndexDataConsumer ()=default
 
virtual void initialize (ASTContext &Ctx)
 
virtual void setPreprocessor (std::shared_ptr< Preprocessor > PP)
 
virtual bool handleDeclOccurrence (const Decl *D, SymbolRoleSet Roles, ArrayRef< SymbolRelation > Relations, SourceLocation Loc, ASTNodeInfo ASTNode)
 
virtual bool handleMacroOccurrence (const IdentifierInfo *Name, const MacroInfo *MI, SymbolRoleSet Roles, SourceLocation Loc)
 
virtual bool handleModuleOccurrence (const ImportDecl *ImportD, const Module *Mod, SymbolRoleSet Roles, SourceLocation Loc)
 
virtual void finish ()
 

Detailed Description

Definition at line 26 of file IndexDataConsumer.h.

Constructor & Destructor Documentation

◆ ~IndexDataConsumer()

virtual clang::index::IndexDataConsumer::~IndexDataConsumer ( )
virtualdefault

Member Function Documentation

◆ finish()

virtual void clang::index::IndexDataConsumer::finish ( )
inlinevirtual

◆ handleDeclOccurrence()

virtual bool clang::index::IndexDataConsumer::handleDeclOccurrence ( const Decl D,
SymbolRoleSet  Roles,
ArrayRef< SymbolRelation Relations,
SourceLocation  Loc,
ASTNodeInfo  ASTNode 
)
inlinevirtual
Returns
true to continue indexing, or false to abort.

Definition at line 42 of file IndexDataConsumer.h.

◆ handleMacroOccurrence()

virtual bool clang::index::IndexDataConsumer::handleMacroOccurrence ( const IdentifierInfo Name,
const MacroInfo MI,
SymbolRoleSet  Roles,
SourceLocation  Loc 
)
inlinevirtual

◆ handleModuleOccurrence()

virtual bool clang::index::IndexDataConsumer::handleModuleOccurrence ( const ImportDecl ImportD,
const Module Mod,
SymbolRoleSet  Roles,
SourceLocation  Loc 
)
inlinevirtual
Returns
true to continue indexing, or false to abort.

This will be called for each module reference in an import decl. For "@import MyMod.SubMod", there will be a call for 'MyMod' with the 'reference' role, and a call for 'SubMod' with the 'declaration' role.

Definition at line 60 of file IndexDataConsumer.h.

Referenced by clang::index::IndexingContext::importedModule(), and reportModuleReferences().

◆ initialize()

virtual void clang::index::IndexDataConsumer::initialize ( ASTContext Ctx)
inlinevirtual

◆ setPreprocessor()

virtual void clang::index::IndexDataConsumer::setPreprocessor ( std::shared_ptr< Preprocessor PP)
inlinevirtual

Definition at line 39 of file IndexDataConsumer.h.

Referenced by clang::index::indexASTUnit().


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