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 |
| FileIDAndOffset | 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. | |
| FileIDAndOffset | 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() and hasManager() before calling the member functions.
Definition at line 371 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()
◆ getDecomposedExpansionLoc()
◆ getDecomposedLoc()
◆ getExpansionColumnNumber()
◆ getExpansionLineNumber()
◆ 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()
◆ getManager()
| const SourceManager & clang::FullSourceLoc::getManager ( ) const | inline |
|---|
Precondition
Definition at line 385 of file SourceLocation.h.
References clang::SourceLocation::SourceManager.
Referenced by adjustColumnPos(), compare(), compareCrossTUSourceLocs(), comparePiece(), clang::ento::PathDiagnosticLocation::createSingleLocation(), Diag(), clang::DiagnosticRenderer::emitDiagnostic(), clang::TextDiagnostic::emitDiagnosticLoc(), clang::TextDiagnostic::emitIncludeLocation(), MakeCharSourceRange(), mapDiagnosticRanges(), clang::operator<<(), rangesInsideSameMacroArgExpansion(), and clang::StandaloneDiagnostic::StandaloneDiagnostic().
◆ getModuleImportLoc()
| std::pair< FullSourceLoc, StringRef > FullSourceLoc::getModuleImportLoc | ( | ) | const |
|---|
◆ getPresumedLoc()
◆ getSpellingColumnNumber()
◆ getSpellingLineNumber()
◆ getSpellingLoc()
◆ hasManager()
| bool clang::FullSourceLoc::hasManager ( ) const | inline |
|---|
◆ isBeforeInTranslationUnitThan() [1/2]
| bool clang::FullSourceLoc::isBeforeInTranslationUnitThan ( FullSourceLoc Loc) const | inline |
|---|
◆ isBeforeInTranslationUnitThan() [2/2]
◆ isInSystemHeader()
| bool FullSourceLoc::isInSystemHeader | ( | ) | const |
|---|
◆ isMacroArgExpansion()
◆ operator!=
◆ operator==
The documentation for this class was generated from the following files:
- include/clang/Basic/SourceLocation.h
- lib/Basic/SourceLocation.cpp