clang 20.0.0git
|
Stores the declaration occurrences seen in a particular source or header file of a translation unit. More...
#include "/home/buildbot/as-worker-4/publish-doxygen-docs/llvm-project/clang/lib/Index/FileIndexRecord.h"
Public Member Functions | |
FileIndexRecord (FileID FID, bool IsSystem) | |
ArrayRef< DeclOccurrence > | getDeclOccurrencesSortedByOffset () const |
FileID | getFileID () const |
bool | isSystem () const |
void | addDeclOccurence (SymbolRoleSet Roles, unsigned Offset, const Decl *D, ArrayRef< SymbolRelation > Relations) |
Adds an occurrence of the canonical declaration D at the supplied Offset . | |
void | addMacroOccurence (SymbolRoleSet Roles, unsigned Offset, const IdentifierInfo *Name, const MacroInfo *MI) |
Adds an occurrence of the given macro at the supplied Offset . | |
void | removeHeaderGuardMacros () |
Remove any macro occurrences for header guards. | |
void | print (llvm::raw_ostream &OS, SourceManager &SM) const |
Stores the declaration occurrences seen in a particular source or header file of a translation unit.
Definition at line 26 of file FileIndexRecord.h.
Definition at line 34 of file FileIndexRecord.h.
void FileIndexRecord::addDeclOccurence | ( | SymbolRoleSet | Roles, |
unsigned | Offset, | ||
const Decl * | D, | ||
ArrayRef< SymbolRelation > | Relations | ||
) |
Adds an occurrence of the canonical declaration D
at the supplied Offset
.
Roles | the roles the occurrence fulfills in this position. |
Offset | the offset in the file of this occurrence. |
D | the canonical declaration this is an occurrence of. |
Relations | the set of symbols related to this occurrence. |
Definition at line 31 of file FileIndexRecord.cpp.
References D, and clang::Decl::isCanonicalDecl().
void FileIndexRecord::addMacroOccurence | ( | SymbolRoleSet | Roles, |
unsigned | Offset, | ||
const IdentifierInfo * | Name, | ||
const MacroInfo * | MI | ||
) |
Adds an occurrence of the given macro at the supplied Offset
.
Roles | the roles the occurrence fulfills in this position. |
Offset | the offset in the file of this occurrence. |
Name | the name of the macro. |
MI | the canonical declaration this is an occurrence of. |
Definition at line 40 of file FileIndexRecord.cpp.
ArrayRef< DeclOccurrence > FileIndexRecord::getDeclOccurrencesSortedByOffset | ( | ) | const |
Definition at line 20 of file FileIndexRecord.cpp.
References clang::index::DeclOccurrence::Offset.
|
inline |
Definition at line 38 of file FileIndexRecord.h.
|
inline |
Definition at line 39 of file FileIndexRecord.h.
void FileIndexRecord::print | ( | llvm::raw_ostream & | OS, |
SourceManager & | SM | ||
) | const |
Definition at line 55 of file FileIndexRecord.cpp.
References D, clang::PresumedLoc::getColumn(), clang::PresumedLoc::getFilename(), clang::PresumedLoc::getLine(), clang::Decl::getLocation(), Loc, and SM.
void FileIndexRecord::removeHeaderGuardMacros | ( | ) |
Remove any macro occurrences for header guards.
When preprocessing, this will only be accurate after HandleEndOfFile.
Definition at line 47 of file FileIndexRecord.cpp.
References D.