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

A SourceLocation and its associated SourceManager. More...

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

Public Member Functions
FullSourceLoc ()=default
Creates a FullSourceLoc where isValid() returns false.
FullSourceLoc (SourceLocation Loc, const SourceManager &SM)
bool hasManager () const
Checks whether the SourceManager is present.
const SourceManager & getManager () const
FileID getFileID () const
FullSourceLoc getExpansionLoc () const
FullSourceLoc getSpellingLoc () const
FullSourceLoc getFileLoc () const
PresumedLoc getPresumedLoc (bool UseLineDirectives=true) const
bool isMacroArgExpansion (FullSourceLoc *StartLoc=nullptr) const
FullSourceLoc getImmediateMacroCallerLoc () const
std::pair< FullSourceLoc, StringRef > getModuleImportLoc () const
unsigned getFileOffset () const
unsigned getExpansionLineNumber (bool *Invalid=nullptr) const
unsigned getExpansionColumnNumber (bool *Invalid=nullptr) const
std::pair< FileID, unsigned > getDecomposedExpansionLoc () const
Decompose the underlying SourceLocation into a raw (FileID + Offset) pair, after walking through all expansion records.
unsigned getSpellingLineNumber (bool *Invalid=nullptr) const
unsigned getSpellingColumnNumber (bool *Invalid=nullptr) const
const char * getCharacterData (bool *Invalid=nullptr) const
unsigned getLineNumber (bool *Invalid=nullptr) const
unsigned getColumnNumber (bool *Invalid=nullptr) const
const FileEntry * getFileEntry () const
OptionalFileEntryRef getFileEntryRef () const
StringRef getBufferData (bool *Invalid=nullptr) const
Return a StringRef to the source buffer data for the specified FileID.
std::pair< FileID, unsigned > getDecomposedLoc () const
Decompose the specified location into a raw FileID + Offset pair.
bool isInSystemHeader () const
bool isBeforeInTranslationUnitThan (SourceLocation Loc) const
Determines the order of 2 source locations in the translation unit.
bool isBeforeInTranslationUnitThan (FullSourceLoc Loc) const
Determines the order of 2 source locations in the translation unit.
void dump () const
Prints information about this FullSourceLoc to stderr.
- Public Member Functions inherited from clang::SourceLocation
bool isFileID () const
bool isMacroID () const
bool isValid () const
Return true if this is a valid SourceLocation object.
bool isInvalid () const
SourceLocation getLocWithOffset (IntTy Offset) const
Return a source location with the specified offset from this SourceLocation.
UIntTy getRawEncoding () const
When a SourceLocation itself cannot be used, this returns an (opaque) 32-bit integer encoding for it.
void * getPtrEncoding () const
When a SourceLocation itself cannot be used, this returns an (opaque) pointer encoding for it.
unsigned getHashValue () const
void print (raw_ostream &OS, const SourceManager &SM) const
std::string printToString (const SourceManager &SM) const
void dump (const SourceManager &SM) const
Additional Inherited Members
- Public Types inherited from clang::SourceLocation
using UIntTy = uint32_t
using IntTy = int32_t
- Static Public Member Functions inherited from clang::SourceLocation
static SourceLocation getFromRawEncoding (UIntTy Encoding)
Turn a raw encoding of a SourceLocation object into a real SourceLocation.
static SourceLocation getFromPtrEncoding (const void *Encoding)
Turn a pointer encoding of a SourceLocation object back into a real SourceLocation.
static bool isPairOfFileLocations (SourceLocation Start, SourceLocation End)

A SourceLocation and its associated SourceManager.

This is useful for argument passing to functions that expect both objects.

This class does not guarantee the presence of either the SourceManager or a valid SourceLocation. Clients should use [isValid()](classclang%5F1%5F1SourceLocation.html#a980da8d6100c0a0c3764991ca80ce6e7 "Return true if this is a valid SourceLocation object.") and [hasManager()](classclang%5F1%5F1FullSourceLoc.html#aa7b2a1d30637404aee77c3912a00b04c "Checks whether the SourceManager is present.") before calling the member functions.

Definition at line 369 of file SourceLocation.h.

clang::FullSourceLoc::FullSourceLoc ( ) default

FullSourceLoc() [2/2]

dump()

LLVM_DUMP_METHOD void FullSourceLoc::dump ( ) const

getBufferData()

StringRef FullSourceLoc::getBufferData ( bool * Invalid = nullptr ) const

getCharacterData()

const char * FullSourceLoc::getCharacterData ( bool * Invalid = nullptr ) const

getColumnNumber()

unsigned FullSourceLoc::getColumnNumber ( bool * Invalid = nullptr ) const

getDecomposedExpansionLoc()

std::pair< FileID, unsigned > FullSourceLoc::getDecomposedExpansionLoc ( ) const

getDecomposedLoc()

std::pair< FileID, unsigned > FullSourceLoc::getDecomposedLoc ( ) const

getExpansionColumnNumber()

unsigned FullSourceLoc::getExpansionColumnNumber ( bool * Invalid = nullptr ) const

getExpansionLineNumber()

unsigned FullSourceLoc::getExpansionLineNumber ( bool * Invalid = nullptr ) const

getExpansionLoc()

getFileEntry()

const FileEntry * FullSourceLoc::getFileEntry ( ) const

getFileEntryRef()

getFileID()

FileID FullSourceLoc::getFileID ( ) const

getFileLoc()

getFileOffset()

unsigned FullSourceLoc::getFileOffset ( ) const

getImmediateMacroCallerLoc()

FullSourceLoc FullSourceLoc::getImmediateMacroCallerLoc ( ) const

getLineNumber()

unsigned FullSourceLoc::getLineNumber ( bool * Invalid = nullptr ) const

getManager()

const SourceManager & clang::FullSourceLoc::getManager ( ) const inline

getModuleImportLoc()

std::pair< FullSourceLoc, StringRef > FullSourceLoc::getModuleImportLoc ( ) const

getPresumedLoc()

getSpellingColumnNumber()

unsigned FullSourceLoc::getSpellingColumnNumber ( bool * Invalid = nullptr ) const

getSpellingLineNumber()

unsigned FullSourceLoc::getSpellingLineNumber ( bool * Invalid = nullptr ) const

getSpellingLoc()

hasManager()

bool clang::FullSourceLoc::hasManager ( ) const inline

isBeforeInTranslationUnitThan() [1/2]

bool clang::FullSourceLoc::isBeforeInTranslationUnitThan ( FullSourceLoc Loc) const inline

isBeforeInTranslationUnitThan() [2/2]

Determines the order of 2 source locations in the translation unit.

Returns

true if this source location comes before 'Loc', false otherwise.

Definition at line 260 of file SourceLocation.cpp.

References clang::SourceManager::isBeforeInTranslationUnit(), clang::SourceLocation::isValid(), and Loc.

Referenced by clang::arcmt::CapturedDiagList::clearDiagnostic(), compareCall(), compareControlFlow(), compareCrossTUSourceLocs(), comparePiece(), clang::arcmt::CapturedDiagList::hasDiagnostic(), isBeforeInTranslationUnitThan(), and clang::FullSourceLoc::BeforeThanCompare::operator()().

isInSystemHeader()

bool FullSourceLoc::isInSystemHeader ( ) const

isMacroArgExpansion()

operator!=

operator==


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