clang
10.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. More... | |
bool | isValid () const |
const char * | getFilename () const |
Return the presumed filename of this location. More... | |
FileID | getFileID () const |
unsigned | getLine () const |
Return the presumed line number of this location. More... | |
unsigned | getColumn () const |
Return the presumed column number of this location. More... | |
SourceLocation | getIncludeLoc () const |
Return the presumed include location of this location. More... | |
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 299 of file SourceLocation.h.
|
default |
|
inline |
Definition at line 307 of file SourceLocation.h.
|
inline |
Return the presumed column number of this location.
This cannot be affected by #line, but is packaged here for convenience.
Definition at line 342 of file SourceLocation.h.
Referenced by clang::CodeGen::SanitizerMetadata::disableSanitizerForInstruction(), clang::TextNodeDumper::dumpLocation(), clang::CodeGen::CodeGenFunction::EmitCheckSourceLocation(), clang::TextDiagnostic::emitDiagnosticLoc(), clang::CodeGen::CGOpenMPRuntime::emitUpdateLocation(), clang::getParameterABISpelling(), clang::SourceManager::getPresumedColumnNumber(), clang::LogDiagnosticPrinter::HandleDiagnostic(), clang::CodeGen::CGOpenMPRuntime::LastprivateConditionalRAII::LastprivateConditionalRAII(), clang::index::FileIndexRecord::print(), clang::SourceLocation::print(), clang::printSourceLocationAsJson(), clang::CodeGen::CGDebugInfo::remapDIPath(), and clang::JSONNodeDumper::Visit().
|
inline |
Definition at line 326 of file SourceLocation.h.
|
inline |
Return the presumed filename of this location.
This can be affected by #line etc.
Definition at line 321 of file SourceLocation.h.
References Filename.
Referenced by clang::AttachHeaderIncludeGen(), buildFixItInsertionLine(), clang::CodeGen::SanitizerMetadata::disableSanitizerForInstruction(), clang::DoPrintPreprocessedInput(), clang::TextNodeDumper::dumpLocation(), clang::CodeGen::CodeGenModule::EmitAnnotationUnit(), clang::TextDiagnostic::emitBuildingModuleLocation(), clang::DiagnosticNoteRenderer::emitBuildingModuleLocation(), clang::CodeGen::CodeGenFunction::EmitCheckSourceLocation(), clang::TextDiagnostic::emitDiagnosticLoc(), clang::TextDiagnostic::emitImportLocation(), clang::DiagnosticNoteRenderer::emitImportLocation(), clang::TextDiagnostic::emitIncludeLocation(), clang::DiagnosticNoteRenderer::emitIncludeLocation(), clang::CodeGen::CGOpenMPRuntime::emitUpdateLocation(), getFunctionSourceLocation(), clang::getParameterABISpelling(), clang::LogDiagnosticPrinter::HandleDiagnostic(), clang::Preprocessor::HandlePragmaSystemHeader(), clang::CodeGen::CGOpenMPRuntime::LastprivateConditionalRAII::LastprivateConditionalRAII(), clang::index::FileIndexRecord::print(), clang::SourceLocation::print(), PrintMacroDefinition(), clang::printSourceLocationAsJson(), remapMacroPath(), and clang::JSONNodeDumper::Visit().
|
inline |
Return the presumed include location of this location.
This can be affected by GNU linemarker directives.
Definition at line 350 of file SourceLocation.h.
Referenced by clang::DiagnosticRenderer::emitStoredDiagnostic(), PrintMacroDefinition(), ReadLineMarkerFlags(), remapMacroPath(), and clang::JSONNodeDumper::Visit().
|
inline |
Return the presumed line number of this location.
This can be affected by #line etc.
Definition at line 334 of file SourceLocation.h.
References Line.
Referenced by clang::CodeGen::SanitizerMetadata::disableSanitizerForInstruction(), clang::TextNodeDumper::dumpLocation(), clang::CodeGen::CodeGenModule::EmitAnnotationLineNo(), clang::TextDiagnostic::emitBuildingModuleLocation(), clang::DiagnosticNoteRenderer::emitBuildingModuleLocation(), clang::CodeGen::CodeGenFunction::EmitCheckSourceLocation(), clang::TextDiagnostic::emitDiagnosticLoc(), clang::TextDiagnostic::emitImportLocation(), clang::DiagnosticNoteRenderer::emitImportLocation(), clang::TextDiagnostic::emitIncludeLocation(), clang::DiagnosticNoteRenderer::emitIncludeLocation(), clang::CodeGen::CGOpenMPRuntime::emitUpdateLocation(), getFunctionSourceLocation(), clang::getParameterABISpelling(), clang::SourceManager::getPresumedLineNumber(), clang::LogDiagnosticPrinter::HandleDiagnostic(), clang::Preprocessor::HandlePragmaSystemHeader(), clang::CodeGen::CGOpenMPRuntime::LastprivateConditionalRAII::LastprivateConditionalRAII(), clang::index::FileIndexRecord::print(), clang::SourceLocation::print(), PrintMacroDefinition(), clang::printSourceLocationAsJson(), clang::CodeGen::CGDebugInfo::remapDIPath(), remapMacroPath(), and clang::JSONNodeDumper::Visit().
|
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 315 of file SourceLocation.h.
Referenced by clang::AttachHeaderIncludeGen(), buildFixItInsertionLine(), clang::DoPrintPreprocessedInput(), clang::TextNodeDumper::dumpLocation(), clang::TextDiagnostic::emitDiagnosticLoc(), clang::DiagnosticRenderer::emitStoredDiagnostic(), clang::LogDiagnosticPrinter::HandleDiagnostic(), clang::Preprocessor::HandlePragmaSystemHeader(), clang::SourceLocation::print(), PrintMacroDefinition(), clang::printSourceLocationAsJson(), ReadLineMarkerFlags(), remapMacroPath(), and clang::JSONNodeDumper::Visit().
|
inline |
Definition at line 316 of file SourceLocation.h.
Referenced by clang::CodeGen::SanitizerMetadata::disableSanitizerForInstruction(), clang::CodeGen::CodeGenModule::EmitAnnotationLineNo(), clang::CodeGen::CodeGenModule::EmitAnnotationUnit(), clang::TextDiagnostic::emitBuildingModuleLocation(), clang::DiagnosticNoteRenderer::emitBuildingModuleLocation(), clang::CodeGen::CodeGenFunction::EmitCheckSourceLocation(), clang::TextDiagnostic::emitImportLocation(), clang::DiagnosticNoteRenderer::emitImportLocation(), clang::TextDiagnostic::emitIncludeLocation(), clang::getParameterABISpelling(), clang::CodeGen::CGOpenMPRuntime::LastprivateConditionalRAII::LastprivateConditionalRAII(), clang::CodeGen::CGDebugInfo::remapDIPath(), remapMacroPath(), and clang::JSONNodeDumper::Visit().