class FileIndexRecord
Declaration
class FileIndexRecord { /* full declaration omitted */ };
Description
Stores the declaration occurrences seen in a particular source or header file of a translation unit
Declared at: clang/lib/Index/FileIndexRecord.h:26
Member Variables
- private clang::FileID FID
- private bool IsSystem
- private bool IsSorted = false
- private std::vector<DeclOccurrence> Decls
Method Overview
- public FileIndexRecord(clang::FileID FID, bool IsSystem)
- public void addDeclOccurence(clang::index::SymbolRoleSet Roles, unsigned int Offset, const clang::Decl * D, ArrayRef<clang::index::SymbolRelation> Relations)
- public void addMacroOccurence(clang::index::SymbolRoleSet Roles, unsigned int Offset, const clang::IdentifierInfo * Name, const clang::MacroInfo * MI)
- public ArrayRef<clang::index::DeclOccurrence> getDeclOccurrencesSortedByOffset() const
- public clang::FileID getFileID() const
- public bool isSystem() const
- public void print(llvm::raw_ostream & OS, clang::SourceManager & SM) const
- public void removeHeaderGuardMacros()
Methods
¶FileIndexRecord(clang::FileID FID, bool IsSystem)
FileIndexRecord(clang::FileID FID, bool IsSystem)
Declared at: clang/lib/Index/FileIndexRecord.h:34
Parameters
- clang::FileID FID
- bool IsSystem
¶void addDeclOccurence(
clang::index::SymbolRoleSet Roles,
unsigned int Offset,
const clang::Decl* D,
ArrayRef<clang::index::SymbolRelation>
Relations)
void addDeclOccurence(
clang::index::SymbolRoleSet Roles,
unsigned int Offset,
const clang::Decl* D,
ArrayRef<clang::index::SymbolRelation>
Relations)
Description
Adds an occurrence of the canonical declaration \c D at the supplied\c Offset
Declared at: clang/lib/Index/FileIndexRecord.h:48
Parameters
- clang::index::SymbolRoleSet Roles
- the roles the occurrence fulfills in this position.
- unsigned int Offset
- the offset in the file of this occurrence.
- const clang::Decl* D
- the canonical declaration this is an occurrence of.
- ArrayRef<clang::index::SymbolRelation> Relations
- the set of symbols related to this occurrence.
¶void addMacroOccurence(
clang::index::SymbolRoleSet Roles,
unsigned int Offset,
const clang::IdentifierInfo* Name,
const clang::MacroInfo* MI)
void addMacroOccurence(
clang::index::SymbolRoleSet Roles,
unsigned int Offset,
const clang::IdentifierInfo* Name,
const clang::MacroInfo* MI)
Description
Adds an occurrence of the given macro at the supplied \c Offset.
Declared at: clang/lib/Index/FileIndexRecord.h:57
Parameters
- clang::index::SymbolRoleSet Roles
- the roles the occurrence fulfills in this position.
- unsigned int Offset
- the offset in the file of this occurrence.
- const clang::IdentifierInfo* Name
- the name of the macro.
- const clang::MacroInfo* MI
- the canonical declaration this is an occurrence of.
¶ArrayRef<clang::index::DeclOccurrence>
getDeclOccurrencesSortedByOffset() const
ArrayRef<clang::index::DeclOccurrence>
getDeclOccurrencesSortedByOffset() const
Declared at: clang/lib/Index/FileIndexRecord.h:36
¶clang::FileID getFileID() const
clang::FileID getFileID() const
Declared at: clang/lib/Index/FileIndexRecord.h:38
¶bool isSystem() const
bool isSystem() const
Declared at: clang/lib/Index/FileIndexRecord.h:39
¶void print(llvm::raw_ostream& OS,
clang::SourceManager& SM) const
void print(llvm::raw_ostream& OS,
clang::SourceManager& SM) const
Declared at: clang/lib/Index/FileIndexRecord.h:64
Parameters
¶void removeHeaderGuardMacros()
void removeHeaderGuardMacros()
Description
Remove any macro occurrences for header guards. When preprocessing, this will only be accurate after HandleEndOfFile.
Declared at: clang/lib/Index/FileIndexRecord.h:62