class FullSourceLoc
Declaration
class FullSourceLoc : public SourceLocation { /* full declaration omitted */ };
Description
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()` and `hasManager()` before calling the member functions.
Declared at: clang/include/clang/Basic/SourceLocation.h:368
Inherits from: SourceLocation
Member Variables
- private const clang::SourceManager* SrcMgr = nullptr
Method Overview
- public FullSourceLoc(clang::SourceLocation Loc, const clang::SourceManager & SM)
- public FullSourceLoc()
- public void dump() const
- public llvm::StringRef getBufferData(bool * Invalid = nullptr) const
- public const char * getCharacterData(bool * Invalid = nullptr) const
- public unsigned int getColumnNumber(bool * Invalid = nullptr) const
- public std::pair<FileID, unsigned int> getDecomposedLoc() const
- public unsigned int getExpansionColumnNumber(bool * Invalid = nullptr) const
- public unsigned int getExpansionLineNumber(bool * Invalid = nullptr) const
- public clang::FullSourceLoc getExpansionLoc() const
- public const clang::FileEntry * getFileEntry() const
- public clang::FileID getFileID() const
- public clang::FullSourceLoc getFileLoc() const
- public unsigned int getFileOffset() const
- public clang::FullSourceLoc getImmediateMacroCallerLoc() const
- public unsigned int getLineNumber(bool * Invalid = nullptr) const
- public const clang::SourceManager & getManager() const
- public std::pair<FullSourceLoc, StringRef> getModuleImportLoc() const
- public clang::PresumedLoc getPresumedLoc(bool UseLineDirectives = true) const
- public unsigned int getSpellingColumnNumber(bool * Invalid = nullptr) const
- public unsigned int getSpellingLineNumber(bool * Invalid = nullptr) const
- public clang::FullSourceLoc getSpellingLoc() const
- public bool hasManager() const
- public bool isBeforeInTranslationUnitThan(clang::SourceLocation Loc) const
- public bool isBeforeInTranslationUnitThan(clang::FullSourceLoc Loc) const
- public bool isInSystemHeader() const
- public bool isMacroArgExpansion(clang::FullSourceLoc * StartLoc = nullptr) const
Inherited from SourceLocation:
- public dump
- public getFromPtrEncoding
- public getFromRawEncoding
- public getHashValue
- public getLocWithOffset
- public getPtrEncoding
- public getRawEncoding
- public isFileID
- public isInvalid
- public isMacroID
- public isPairOfFileLocations
- public isValid
- public print
- public printToString
Methods
¶FullSourceLoc(clang::SourceLocation Loc,
const clang::SourceManager& SM)
FullSourceLoc(clang::SourceLocation Loc,
const clang::SourceManager& SM)
Declared at: clang/include/clang/Basic/SourceLocation.h:375
Parameters
- clang::SourceLocation Loc
- const clang::SourceManager& SM
¶FullSourceLoc()
FullSourceLoc()
Description
Creates a FullSourceLoc where isValid() returns \c false.
Declared at: clang/include/clang/Basic/SourceLocation.h:373
¶void dump() const
void dump() const
Description
Prints information about this FullSourceLoc to stderr. This is useful for debugging.
Declared at: clang/include/clang/Basic/SourceLocation.h:447
¶llvm::StringRef getBufferData(
bool* Invalid = nullptr) const
llvm::StringRef getBufferData(
bool* Invalid = nullptr) const
Description
Return a StringRef to the source buffer data for the specified FileID.
Declared at: clang/include/clang/Basic/SourceLocation.h:413
Parameters
- bool* Invalid = nullptr
¶const char* getCharacterData(
bool* Invalid = nullptr) const
const char* getCharacterData(
bool* Invalid = nullptr) const
Declared at: clang/include/clang/Basic/SourceLocation.h:404
Parameters
- bool* Invalid = nullptr
¶unsigned int getColumnNumber(
bool* Invalid = nullptr) const
unsigned int getColumnNumber(
bool* Invalid = nullptr) const
Declared at: clang/include/clang/Basic/SourceLocation.h:407
Parameters
- bool* Invalid = nullptr
¶std::pair<FileID, unsigned int> getDecomposedLoc()
const
std::pair<FileID, unsigned int> getDecomposedLoc()
const
Description
Decompose the specified location into a raw FileID + Offset pair. The first element is the FileID, the second is the offset from the start of the buffer of the location.
Declared at: clang/include/clang/Basic/SourceLocation.h:419
¶unsigned int getExpansionColumnNumber(
bool* Invalid = nullptr) const
unsigned int getExpansionColumnNumber(
bool* Invalid = nullptr) const
Declared at: clang/include/clang/Basic/SourceLocation.h:399
Parameters
- bool* Invalid = nullptr
¶unsigned int getExpansionLineNumber(
bool* Invalid = nullptr) const
unsigned int getExpansionLineNumber(
bool* Invalid = nullptr) const
Declared at: clang/include/clang/Basic/SourceLocation.h:398
Parameters
- bool* Invalid = nullptr
¶clang::FullSourceLoc getExpansionLoc() const
clang::FullSourceLoc getExpansionLoc() const
Declared at: clang/include/clang/Basic/SourceLocation.h:389
¶const clang::FileEntry* getFileEntry() const
const clang::FileEntry* getFileEntry() const
Declared at: clang/include/clang/Basic/SourceLocation.h:409
¶clang::FileID getFileID() const
clang::FileID getFileID() const
Declared at: clang/include/clang/Basic/SourceLocation.h:387
¶clang::FullSourceLoc getFileLoc() const
clang::FullSourceLoc getFileLoc() const
Declared at: clang/include/clang/Basic/SourceLocation.h:391
¶unsigned int getFileOffset() const
unsigned int getFileOffset() const
Declared at: clang/include/clang/Basic/SourceLocation.h:396
¶clang::FullSourceLoc getImmediateMacroCallerLoc()
const
clang::FullSourceLoc getImmediateMacroCallerLoc()
const
Declared at: clang/include/clang/Basic/SourceLocation.h:394
¶unsigned int getLineNumber(
bool* Invalid = nullptr) const
unsigned int getLineNumber(
bool* Invalid = nullptr) const
Declared at: clang/include/clang/Basic/SourceLocation.h:406
Parameters
- bool* Invalid = nullptr
¶const clang::SourceManager& getManager() const
const clang::SourceManager& getManager() const
Declared at: clang/include/clang/Basic/SourceLocation.h:382
¶std::pair<FullSourceLoc, StringRef>
getModuleImportLoc() const
std::pair<FullSourceLoc, StringRef>
getModuleImportLoc() const
Declared at: clang/include/clang/Basic/SourceLocation.h:395
¶clang::PresumedLoc getPresumedLoc(
bool UseLineDirectives = true) const
clang::PresumedLoc getPresumedLoc(
bool UseLineDirectives = true) const
Declared at: clang/include/clang/Basic/SourceLocation.h:392
Parameters
- bool UseLineDirectives = true
¶unsigned int getSpellingColumnNumber(
bool* Invalid = nullptr) const
unsigned int getSpellingColumnNumber(
bool* Invalid = nullptr) const
Declared at: clang/include/clang/Basic/SourceLocation.h:402
Parameters
- bool* Invalid = nullptr
¶unsigned int getSpellingLineNumber(
bool* Invalid = nullptr) const
unsigned int getSpellingLineNumber(
bool* Invalid = nullptr) const
Declared at: clang/include/clang/Basic/SourceLocation.h:401
Parameters
- bool* Invalid = nullptr
¶clang::FullSourceLoc getSpellingLoc() const
clang::FullSourceLoc getSpellingLoc() const
Declared at: clang/include/clang/Basic/SourceLocation.h:390
¶bool hasManager() const
bool hasManager() const
Description
Checks whether the SourceManager is present.
Declared at: clang/include/clang/Basic/SourceLocation.h:379
¶bool isBeforeInTranslationUnitThan(
clang::SourceLocation Loc) const
bool isBeforeInTranslationUnitThan(
clang::SourceLocation Loc) const
Description
Determines the order of 2 source locations in the translation unit.
Declared at: clang/include/clang/Basic/SourceLocation.h:426
Parameters
Returns
true if this source location comes before 'Loc', false otherwise.
¶bool isBeforeInTranslationUnitThan(
clang::FullSourceLoc Loc) const
bool isBeforeInTranslationUnitThan(
clang::FullSourceLoc Loc) const
Description
Determines the order of 2 source locations in the translation unit.
Declared at: clang/include/clang/Basic/SourceLocation.h:431
Parameters
Returns
true if this source location comes before 'Loc', false otherwise.
¶bool isInSystemHeader() const
bool isInSystemHeader() const
Declared at: clang/include/clang/Basic/SourceLocation.h:421
¶bool isMacroArgExpansion(
clang::FullSourceLoc* StartLoc =
nullptr) const
bool isMacroArgExpansion(
clang::FullSourceLoc* StartLoc =
nullptr) const
Declared at: clang/include/clang/Basic/SourceLocation.h:393
Parameters
- clang::FullSourceLoc* StartLoc = nullptr