clang API Documentation
A SourceLocation and its associated SourceManager. More...
#include <SourceLocation.h>


Classes | |
| struct | BeforeThanCompare |
| Comparison function class, useful for sorting FullSourceLocs. More... | |
Public Member Functions | |
| FullSourceLoc () | |
Creates a FullSourceLoc where isValid() returns false. | |
| FullSourceLoc (SourceLocation Loc, const SourceManager &SM) | |
| const SourceManager & | getManager () const |
| FileID | getFileID () const |
| FullSourceLoc | getExpansionLoc () const |
| FullSourceLoc | getSpellingLoc () const |
| unsigned | getExpansionLineNumber (bool *Invalid=nullptr) const |
| unsigned | getExpansionColumnNumber (bool *Invalid=nullptr) const |
| unsigned | getSpellingLineNumber (bool *Invalid=nullptr) const |
| unsigned | getSpellingColumnNumber (bool *Invalid=nullptr) const |
| const char * | getCharacterData (bool *Invalid=nullptr) 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. | |
Friends | |
| bool | operator== (const FullSourceLoc &LHS, const FullSourceLoc &RHS) |
| bool | operator!= (const FullSourceLoc &LHS, const FullSourceLoc &RHS) |
A SourceLocation and its associated SourceManager.
This is useful for argument passing to functions that expect both objects.
Definition at line 267 of file SourceLocation.h.
| clang::FullSourceLoc::FullSourceLoc | ( | ) | [inline, explicit] |
Creates a FullSourceLoc where isValid() returns false.
Definition at line 271 of file SourceLocation.h.
| clang::FullSourceLoc::FullSourceLoc | ( | SourceLocation | Loc, |
| const SourceManager & | SM | ||
| ) | [inline, explicit] |
Definition at line 273 of file SourceLocation.h.
| LLVM_DUMP_METHOD void FullSourceLoc::dump | ( | ) | const |
Prints information about this FullSourceLoc to stderr.
This is useful for debugging.
Definition at line 126 of file SourceLocation.cpp.
| StringRef FullSourceLoc::getBufferData | ( | bool * | Invalid = nullptr | ) | const |
Return a StringRef to the source buffer data for the specified FileID.
Definition at line 135 of file SourceLocation.cpp.
| const char * FullSourceLoc::getCharacterData | ( | bool * | Invalid = nullptr | ) | const |
Definition at line 130 of file SourceLocation.cpp.
| std::pair< FileID, unsigned > FullSourceLoc::getDecomposedLoc | ( | ) | const |
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.
Definition at line 140 of file SourceLocation.cpp.
| unsigned FullSourceLoc::getExpansionColumnNumber | ( | bool * | Invalid = nullptr | ) | const |
Definition at line 101 of file SourceLocation.cpp.
Referenced by clang::markup::EmitLocation().
| unsigned FullSourceLoc::getExpansionLineNumber | ( | bool * | Invalid = nullptr | ) | const |
Definition at line 96 of file SourceLocation.cpp.
Referenced by clang::markup::EmitLocation(), and GenerateMinimalPathDiagnostic().
| FullSourceLoc FullSourceLoc::getExpansionLoc | ( | ) | const |
Definition at line 86 of file SourceLocation.cpp.
Referenced by clang::ento::PathDiagnosticConsumer::HandlePathDiagnostic(), and clang::ModuleMap::inferModuleFromLocation().
| FileID FullSourceLoc::getFileID | ( | ) | const |
Definition at line 80 of file SourceLocation.cpp.
Referenced by clang::ModuleMap::inferModuleFromLocation().
| const SourceManager& clang::FullSourceLoc::getManager | ( | ) | const [inline] |
Definition at line 277 of file SourceLocation.h.
Referenced by compare(), comparePiece(), clang::ento::PathDiagnosticLocation::createSingleLocation(), Diag(), clang::DiagnosticRenderer::emitStoredDiagnostic(), clang::ModuleMap::inferModuleFromLocation(), MakeCharSourceRange(), and makeStandaloneDiagnostic().
| unsigned FullSourceLoc::getSpellingColumnNumber | ( | bool * | Invalid = nullptr | ) | const |
Definition at line 111 of file SourceLocation.cpp.
| unsigned FullSourceLoc::getSpellingLineNumber | ( | bool * | Invalid = nullptr | ) | const |
Definition at line 106 of file SourceLocation.cpp.
| FullSourceLoc FullSourceLoc::getSpellingLoc | ( | ) | const |
Definition at line 91 of file SourceLocation.cpp.
Referenced by clang::ento::LikelyFalsePositiveSuppressionBRVisitor::getEndPath().
Determines the order of 2 source locations in the translation unit.
Definition at line 121 of file SourceLocation.cpp.
Referenced by clang::arcmt::CapturedDiagList::clearDiagnostic(), compare(), compareCall(), compareControlFlow(), comparePiece(), clang::arcmt::CapturedDiagList::hasDiagnostic(), isBeforeInTranslationUnitThan(), clang::FullSourceLoc::BeforeThanCompare::operator()(), and clang::DiagnosticsEngine::setSeverity().
| bool clang::FullSourceLoc::isBeforeInTranslationUnitThan | ( | FullSourceLoc | Loc | ) | const [inline] |
Determines the order of 2 source locations in the translation unit.
Definition at line 316 of file SourceLocation.h.
References isBeforeInTranslationUnitThan(), and clang::SourceLocation::isValid().
| bool FullSourceLoc::isInSystemHeader | ( | ) | const |
Definition at line 116 of file SourceLocation.cpp.
| bool operator!= | ( | const FullSourceLoc & | LHS, |
| const FullSourceLoc & | RHS | ||
| ) | [friend] |
Definition at line 342 of file SourceLocation.h.
| bool operator== | ( | const FullSourceLoc & | LHS, |
| const FullSourceLoc & | RHS | ||
| ) | [friend] |
Definition at line 336 of file SourceLocation.h.