clang: clang::DeclIDBase Class Reference (original) (raw)

GlobalDeclID means DeclID in the current ASTContext and LocalDeclID means DeclID specific to a certain ModuleFile. More...

#include "[clang/AST/DeclID.h](DeclID%5F8h%5Fsource.html)"

Public Types
using DeclID = uint64_t
An ID number that refers to a declaration in an AST file.
Public Member Functions
DeclID getRawValue () const
operator DeclID () const
operator PredefinedDeclIDs () const
bool isValid () const
bool isInvalid () const
unsigned getModuleFileIndex () const
unsigned getLocalDeclIndex () const
Friends
bool operator== (const DeclIDBase &LHS, const DeclID &RHS)
bool operator!= (const DeclIDBase &LHS, const DeclID &RHS)
bool operator< (const DeclIDBase &LHS, const DeclID &RHS)
bool operator<= (const DeclIDBase &LHS, const DeclID &RHS)
bool operator> (const DeclIDBase &LHS, const DeclID &RHS)
bool operator>= (const DeclIDBase &LHS, const DeclID &RHS)
bool operator== (const DeclIDBase &LHS, const DeclIDBase &RHS)
bool operator!= (const DeclIDBase &LHS, const DeclIDBase &RHS)
bool operator< (const DeclIDBase &LHS, const DeclIDBase &RHS)
bool operator> (const DeclIDBase &LHS, const DeclIDBase &RHS)
bool operator<= (const DeclIDBase &LHS, const DeclIDBase &RHS)
bool operator>= (const DeclIDBase &LHS, const DeclIDBase &RHS)

GlobalDeclID means DeclID in the current ASTContext and LocalDeclID means DeclID specific to a certain ModuleFile.

Specially, in ASTWriter, the LocalDeclID to the ModuleFile been writting is equal to the GlobalDeclID. Outside the serializer, all the DeclID been used should be GlobalDeclID. We can translate a LocalDeclID to the GlobalDeclID by [ASTReader::getGlobalDeclID()](classclang%5F1%5F1ASTReader.html#a80b9d632ad37edacdfd07f12c3450d84 "Map from a local declaration ID within a given module to a global declaration ID.").

Definition at line 100 of file DeclID.h.

DeclID

An ID number that refers to a declaration in an AST file.

The ID numbers of declarations are consecutive (in order of discovery), with values below NUM_PREDEF_DECL_IDS being reserved. At the start of a chain of precompiled headers, declaration ID 1 is used for the translation unit declaration.

DeclID should only be used directly in serialization. All other users should use LocalDeclID or GlobalDeclID.

Definition at line 111 of file DeclID.h.

clang::DeclIDBase::DeclIDBase ( ) inlineprotected

DeclIDBase() [2/2]

clang::DeclIDBase::DeclIDBase ( DeclID ID) inlineexplicitprotected

getLocalDeclIndex()

unsigned DeclIDBase::getLocalDeclIndex ( ) const

getModuleFileIndex()

unsigned clang::DeclIDBase::getModuleFileIndex ( ) const inline

getRawValue()

DeclID clang::DeclIDBase::getRawValue ( ) const inline

isInvalid()

bool clang::DeclIDBase::isInvalid ( ) const inline

isValid()

bool clang::DeclIDBase::isValid ( ) const inline

operator DeclID()

clang::DeclIDBase::operator DeclID ( ) const inlineexplicit

operator PredefinedDeclIDs()

operator!= [1/2]

operator!= [2/2]

operator< [1/2]

operator< [2/2]

operator<= [1/2]

operator<= [2/2]

operator== [1/2]

operator== [2/2]

operator> [1/2]

operator> [2/2]

operator>= [1/2]

operator>= [2/2]

ID


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