clang 20.0.0git
|
Represents an unpacked "presumed" location which can be presented to the user. More...
#include "clang/Basic/SourceLocation.h"
Public Member Functions | |
PresumedLoc ()=default | |
PresumedLoc (const char *FN, FileID FID, unsigned Ln, unsigned Co, SourceLocation IL) | |
bool | isInvalid () const |
Return true if this object is invalid or uninitialized. | |
bool | isValid () const |
const char * | getFilename () const |
Return the presumed filename of this location. | |
FileID | getFileID () const |
unsigned | getLine () const |
Return the presumed line number of this location. | |
unsigned | getColumn () const |
Return the presumed column number of this location. | |
SourceLocation | getIncludeLoc () const |
Return the presumed include location of this location. | |
Represents an unpacked "presumed" location which can be presented to the user.
A 'presumed' location can be modified by #line and GNU line marker directives and is always the expansion point of a normal location.
You can get a PresumedLoc from a SourceLocation with SourceManager.
Definition at line 305 of file SourceLocation.h.
|
default |
|
inline |
Definition at line 313 of file SourceLocation.h.
References Filename.
|
inline |
Return the presumed column number of this location.
This cannot be affected by #line, but is packaged here for convenience.
Definition at line 348 of file SourceLocation.h.
References isValid().
Referenced by clang::TextNodeDumper::dumpLocation(), clang::TextDiagnostic::emitDiagnosticLoc(), emitMappingInformation(), clang::CodeGen::CGOpenMPRuntime::emitUpdateLocation(), clang::SourceLocExpr::EvaluateInContext(), getIdentStringFromSourceLocation(), clang::SourceManager::getPresumedColumnNumber(), clang::LogDiagnosticPrinter::HandleDiagnostic(), clang::index::FileIndexRecord::print(), clang::SourceLocation::print(), PrintDifference(), and clang::printSourceLocationAsJson().
|
inline |
Definition at line 332 of file SourceLocation.h.
References isValid().
|
inline |
Return the presumed filename of this location.
This can be affected by #line etc.
Definition at line 327 of file SourceLocation.h.
References Filename, and isValid().
Referenced by clang::DoPrintPreprocessedInput(), clang::TextNodeDumper::dumpLocation(), clang::CodeGen::CodeGenModule::EmitAnnotationUnit(), clang::DiagnosticNoteRenderer::emitBuildingModuleLocation(), clang::TextDiagnostic::emitBuildingModuleLocation(), clang::TextDiagnostic::emitDiagnosticLoc(), clang::DiagnosticNoteRenderer::emitImportLocation(), clang::TextDiagnostic::emitImportLocation(), clang::DiagnosticNoteRenderer::emitIncludeLocation(), clang::TextDiagnostic::emitIncludeLocation(), emitMappingInformation(), emitTargetTeamsLoopCodegenStatus(), clang::CodeGen::CGOpenMPRuntime::emitUpdateLocation(), clang::SourceLocExpr::EvaluateInContext(), getEntryInfoFromPresumedLoc(), getIdentStringFromSourceLocation(), clang::LogDiagnosticPrinter::HandleDiagnostic(), clang::Preprocessor::HandlePragmaSystemHeader(), clang::SourceManager::isWrittenInBuiltinFile(), clang::SourceManager::isWrittenInCommandLineFile(), clang::SourceManager::isWrittenInScratchSpace(), clang::index::FileIndexRecord::print(), clang::SourceLocation::print(), PrintDifference(), clang::CodeGen::CodeGenModule::printPostfixForExternalizedDecl(), clang::printSourceLocationAsJson(), clang::Preprocessor::processPathToFileName(), and clang::extractapi::SymbolGraphSerializer::serializeSingleSymbolSGF().
|
inline |
Return the presumed include location of this location.
This can be affected by GNU linemarker directives.
Definition at line 356 of file SourceLocation.h.
References isValid().
Referenced by ReadLineMarkerFlags().
|
inline |
Return the presumed line number of this location.
This can be affected by #line etc.
Definition at line 340 of file SourceLocation.h.
References isValid().
Referenced by clang::TextNodeDumper::dumpLocation(), clang::CodeGen::CodeGenModule::EmitAnnotationLineNo(), clang::DiagnosticNoteRenderer::emitBuildingModuleLocation(), clang::TextDiagnostic::emitBuildingModuleLocation(), clang::TextDiagnostic::emitDiagnosticLoc(), clang::DiagnosticNoteRenderer::emitImportLocation(), clang::TextDiagnostic::emitImportLocation(), clang::DiagnosticNoteRenderer::emitIncludeLocation(), clang::TextDiagnostic::emitIncludeLocation(), emitMappingInformation(), emitTargetTeamsLoopCodegenStatus(), clang::CodeGen::CGOpenMPRuntime::emitUpdateLocation(), clang::SourceLocExpr::EvaluateInContext(), getEntryInfoFromPresumedLoc(), getIdentStringFromSourceLocation(), clang::SourceManager::getPresumedLineNumber(), clang::LogDiagnosticPrinter::HandleDiagnostic(), clang::Preprocessor::HandlePragmaSystemHeader(), clang::index::FileIndexRecord::print(), clang::SourceLocation::print(), PrintDifference(), and clang::printSourceLocationAsJson().
|
inline |
Return true if this object is invalid or uninitialized.
This occurs when created with invalid source locations or when walking off the top of a #include stack.
Definition at line 321 of file SourceLocation.h.
References Filename.
Referenced by clang::DoPrintPreprocessedInput(), clang::TextNodeDumper::dumpLocation(), clang::TextDiagnostic::emitDiagnosticLoc(), clang::LogDiagnosticPrinter::HandleDiagnostic(), clang::Preprocessor::HandlePragmaSystemHeader(), clang::SourceManager::isWrittenInBuiltinFile(), clang::SourceManager::isWrittenInCommandLineFile(), clang::SourceManager::isWrittenInScratchSpace(), clang::SourceLocation::print(), PrintDifference(), clang::printSourceLocationAsJson(), ReadLineMarkerFlags(), and clang::CodeGen::CGDebugInfo::setLocation().
|
inline |
Definition at line 322 of file SourceLocation.h.
References Filename.
Referenced by clang::CodeGen::CGDebugInfo::AddStringLiteralDebugInfo(), clang::CodeGen::CodeGenModule::EmitAnnotationLineNo(), clang::CodeGen::CodeGenModule::EmitAnnotationUnit(), clang::DiagnosticNoteRenderer::emitBuildingModuleLocation(), clang::TextDiagnostic::emitBuildingModuleLocation(), clang::DiagnosticNoteRenderer::emitImportLocation(), clang::TextDiagnostic::emitImportLocation(), clang::TextDiagnostic::emitIncludeLocation(), emitTargetTeamsLoopCodegenStatus(), getColumn(), getFileID(), getFilename(), getIncludeLoc(), getLine(), and clang::CodeGen::CodeGenModule::printPostfixForExternalizedDecl().