clang: clang::PresumedLoc Class Reference (original) (raw)
Represents an unpacked "presumed" location which can be presented to the user. More...
#include "[clang/Basic/SourceLocation.h](SourceLocation%5F8h%5Fsource.html)"
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. | |
Detailed Description
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](classclang%5F1%5F1PresumedLoc.html "Represents an unpacked "presumed" location which can be presented to the user.") from a SourceLocation with SourceManager.
Definition at line 305 of file SourceLocation.h.
Constructor & Destructor Documentation
clang::PresumedLoc::PresumedLoc ( ) | default |
---|
◆ PresumedLoc() [2/2]
Member Function Documentation
◆ getColumn()
unsigned clang::PresumedLoc::getColumn ( ) const | 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::CIRGen::CIRGenModule::getLoc(), clang::SourceManager::getPresumedColumnNumber(), clang::LogDiagnosticPrinter::HandleDiagnostic(), clang::index::FileIndexRecord::print(), clang::SourceLocation::print(), PrintDifference(), and clang::printSourceLocationAsJson().
◆ getFileID()
FileID clang::PresumedLoc::getFileID ( ) const | inline |
---|
◆ getFilename()
const char * clang::PresumedLoc::getFilename ( ) const | 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::CIRGen::CIRGenModule::getLoc(), 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().
◆ getIncludeLoc()
◆ getLine()
unsigned clang::PresumedLoc::getLine ( ) const | 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::CIRGen::CIRGenModule::getLoc(), clang::SourceManager::getPresumedLineNumber(), clang::LogDiagnosticPrinter::HandleDiagnostic(), clang::Preprocessor::HandlePragmaSystemHeader(), clang::index::FileIndexRecord::print(), clang::SourceLocation::print(), PrintDifference(), and clang::printSourceLocationAsJson().
◆ isInvalid()
bool clang::PresumedLoc::isInvalid ( ) const | 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().
◆ isValid()
bool clang::PresumedLoc::isValid ( ) const | 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().
The documentation for this class was generated from the following file:
- include/clang/Basic/SourceLocation.h