clang
6.0.0
|
Encodes a location in the source. More...
#include "clang/Basic/SourceLocation.h"
Public Member Functions | |
bool | isFileID () const |
bool | isMacroID () const |
bool | isValid () const |
Return true if this is a valid SourceLocation object. More... | |
bool | isInvalid () const |
SourceLocation | getLocWithOffset (int Offset) const |
Return a source location with the specified offset from this SourceLocation. More... | |
unsigned | getRawEncoding () const |
When a SourceLocation itself cannot be used, this returns an (opaque) 32-bit integer encoding for it. More... | |
void * | getPtrEncoding () const |
When a SourceLocation itself cannot be used, this returns an (opaque) pointer encoding for it. More... | |
void | print (raw_ostream &OS, const SourceManager &SM) const |
std::string | printToString (const SourceManager &SM) const |
void | dump (const SourceManager &SM) const |
Static Public Member Functions | |
static SourceLocation | getFromRawEncoding (unsigned Encoding) |
Turn a raw encoding of a SourceLocation object into a real SourceLocation. More... | |
static SourceLocation | getFromPtrEncoding (const void *Encoding) |
Turn a pointer encoding of a SourceLocation object back into a real SourceLocation. More... | |
static bool | isPairOfFileLocations (SourceLocation Start, SourceLocation End) |
Friends | |
class | SourceManager |
class | ASTReader |
class | ASTWriter |
Encodes a location in the source.
The SourceManager can decode this to get at the full include stack, line and column information.
Technically, a source location is simply an offset into the manager's view of the input source, which is all input buffers (including macro expansions) concatenated in an effectively arbitrary order. The manager actually maintains two blocks of input buffers. One, starting at offset 0 and growing upwards, contains all buffers from this module. The other, starting at the highest possible offset and growing downwards, contains buffers of loaded modules.
In addition, one bit of SourceLocation is used for quick access to the information whether the location is in a file or a macro expansion.
It is important that this type remains small. It is currently 32 bits wide.
Definition at line 87 of file SourceLocation.h.
LLVM_DUMP_METHOD void SourceLocation::dump | ( | const SourceManager & | SM | ) | const |
Definition at line 71 of file SourceLocation.cpp.
Referenced by clang::comments::Token::dump(), clang::arcmt::trans::MigrationContext::dumpGCAttrs(), and clang::Preprocessor::DumpLocation().
|
inlinestatic |
Turn a pointer encoding of a SourceLocation object back into a real SourceLocation.
Definition at line 168 of file SourceLocation.h.
Referenced by clang::ImplicitCallPoint::getLocation().
|
inlinestatic |
Turn a raw encoding of a SourceLocation object into a real SourceLocation.
Definition at line 149 of file SourceLocation.h.
References X.
Referenced by diagnoseRedundantReturnTypeQualifiers(), fillAtomicQualLoc(), clang::DependentDiagnostic::getAccessLoc(), clang::Token::getAnnotationEndLoc(), clang::AttributedTypeLoc::getAttrEnumOperandLoc(), clang::serialization::PPEntityOffset::getBegin(), clang::InitializedEntity::getCaptureLoc(), clang::DeclaratorChunk::FunctionTypeInfo::getConstQualifierLoc(), clang::DeclarationNameInfo::getCXXLiteralOperatorNameLoc(), clang::DeclarationNameInfo::getCXXOperatorNameRange(), clang::Designator::getDotLoc(), clang::DesignatedInitExpr::Designator::getDotLoc(), clang::Designator::getEllipsisLoc(), clang::DeclaratorChunk::FunctionTypeInfo::getEllipsisLoc(), clang::DesignatedInitExpr::Designator::getEllipsisLoc(), clang::serialization::PPEntityOffset::getEnd(), clang::DeclaratorChunk::FunctionTypeInfo::getExceptionSpecLocBeg(), clang::DeclaratorChunk::FunctionTypeInfo::getExceptionSpecLocEnd(), clang::SrcMgr::ExpansionInfo::getExpansionLocEnd(), clang::SrcMgr::ExpansionInfo::getExpansionLocStart(), clang::Designator::getFieldLoc(), clang::DesignatedInitExpr::Designator::getFieldLoc(), llvm::PointerLikeTypeTraits< clang::SourceLocation >::getFromVoidPointer(), clang::SrcMgr::FileInfo::getIncludeLoc(), clang::ObjCTypeParamList::getLAngleLoc(), clang::Designator::getLBracketLoc(), clang::DesignatedInitExpr::Designator::getLBracketLoc(), clang::Token::getLocation(), clang::serialization::DeclOffset::getLocation(), clang::MMToken::getLocation(), clang::DesignatedInitExpr::getLocStart(), clang::DeclaratorChunk::FunctionTypeInfo::getLParenLoc(), clang::DeclaratorChunk::FunctionTypeInfo::getMutableLoc(), clang::ObjCTypeParamList::getRAngleLoc(), clang::Designator::getRBracketLoc(), clang::DesignatedInitExpr::Designator::getRBracketLoc(), clang::DeclaratorChunk::FunctionTypeInfo::getRefQualifierLoc(), clang::DeclaratorChunk::FunctionTypeInfo::getRestrictQualifierLoc(), clang::InitializedEntity::getReturnLoc(), clang::DeclaratorChunk::FunctionTypeInfo::getRParenLoc(), clang::SrcMgr::ExpansionInfo::getSpellingLoc(), clang::InitializedEntity::getThrowLoc(), clang::DeclaratorChunk::FunctionTypeInfo::getVolatileQualifierLoc(), clang::BackendConsumer::InlineAsmDiagHandler(), clang::SrcMgr::ExpansionInfo::isMacroArgExpansion(), clang::SrcMgr::ExpansionInfo::isMacroBodyExpansion(), LoadSourceLocation(), clang::ASTReader::ReadMismatchingDeleteExpressions(), clang::ASTReader::ReadPendingInstantiations(), clang::ASTReader::ReadUndefinedButUsed(), clang::ASTReader::ReadUntranslatedSourceLocation(), clang::ASTReader::ReadUsedVTables(), and clang::TreeTransform< Derived >::RebuildCXXOperatorCallExpr().
|
inline |
Return a source location with the specified offset from this SourceLocation.
Definition at line 131 of file SourceLocation.h.
Referenced by clang::Sema::ActOnComment(), clang::comments::Sema::actOnVerbatimBlockStart(), clang::comments::Sema::actOnVerbatimLine(), addFixitForObjCARCConversion(), clang::html::AddHeaderFooterInternalBuiltinCSS(), clang::Lexer::AdvanceToTokenCharacter(), applyRewrite(), clang::TokenConcatenation::AvoidConcat(), clang::arcmt::ObjCMigrateAction::BeginInvocation(), clang::Preprocessor::checkModuleIsAvailable(), CheckMoveOnConstruction(), checkRangeForMacroArgExpansion(), clang::edit::EditedSource::clearRewrites(), ConvertBackendLocation(), clang::CreateModernObjCRewriter(), clang::CreateObjCRewriter(), clang::arcmt::trans::findLocationAfterSemi(), clang::Lexer::findLocationAfterToken(), findPlaceholderEnd(), FixDigraph(), clang::Lexer::getAsCharRange(), clang::Lexer::GetBeginningOfToken(), clang::comments::BlockCommandComment::getCommandNameBeginLoc(), clang::Token::getEndLoc(), clang::comments::Token::getEndLocation(), clang::edit::Commit::Edit::getFileLocation(), clang::edit::Commit::Edit::getFileRange(), clang::SourceManager::getImmediateSpellingLoc(), clang::edit::Commit::Edit::getInsertFromRange(), clang::ASTUnit::getLocation(), clang::Lexer::getLocForEndOfToken(), GetMappedTokenLoc(), clang::comments::HTMLStartTagComment::Attribute::getNameLocEnd(), clang::SourceManager::getPresumedLoc(), clang::PTHLexer::getSourceLocation(), clang::Lexer::getSourceLocation(), getStandardSelLoc(), clang::comments::HTMLTagComment::getTagNameSourceRange(), clang::ScratchBuffer::getToken(), clang::Preprocessor::HandleEndOfFile(), clang::ASTImporter::Import(), clang::SourceManager::isAtEndOfImmediateMacroExpansion(), clang::Lexer::isAtEndOfMacroExpansion(), clang::TokenLexer::isParsingPreprocessorDirective(), clang::ASTUnit::mapLocationFromPreamble(), clang::ASTUnit::mapLocationToPreamble(), mustSynthesizeSetterGetterMethod(), clang::Parser::ParseConstraintExpression(), clang::Sema::ParseObjCSelectorExpression(), clang::Parser::ParseTopLevelDecl(), clang::edit::Commit::replaceText(), clang::format::WhitespaceManager::replaceWhitespaceInToken(), rewriteToNSEnumDecl(), rewriteToNSMacroDecl(), rewriteToObjCProperty(), scanToNextArgument(), SelectDigraphErrorMessage(), clang::CoverageSourceInfo::SourceRangeSkipped(), sumOffsets(), clang::SourceManager::translateLineCol(), clang::ASTReader::TranslateSourceLocation(), clang::tooling::RecursiveSymbolVisitor< T >::TraverseNestedNameSpecifierLoc(), updateConsecutiveMacroArgTokens(), and Write_RethrowObject().
|
inline |
When a SourceLocation itself cannot be used, this returns an (opaque) pointer encoding for it.
This should only be passed to SourceLocation::getFromPtrEncoding, it should not be inspected directly.
Definition at line 160 of file SourceLocation.h.
Referenced by llvm::PointerLikeTypeTraits< clang::SourceLocation >::getAsVoidPointer().
|
inline |
When a SourceLocation itself cannot be used, this returns an (opaque) 32-bit integer encoding for it.
This should only be passed to SourceLocation::getFromRawEncoding, it should not be inspected directly.
Definition at line 143 of file SourceLocation.h.
Referenced by clang::ASTWriter::AddSourceLocation(), checkAllAtProps(), checkAllProps(), checkWeakGCAttrs(), clang::SrcMgr::ExpansionInfo::create(), clang::DesignatedInitExpr::Designator::Designator(), clang::Designator::getArray(), clang::Designator::getArrayRange(), getAsmSrcLocInfo(), clang::Designator::getField(), llvm::DenseMapInfo< clang::Sema::FunctionDeclAndLoc >::getHashValue(), clang::ModuleMapParser::getLocation(), clang::tooling::SymbolOccurrence::getNameRanges(), clang::ObjCTypeParamDecl::getSourceRange(), clang::operator<(), clang::operator==(), clang::edit::EditsReceiver::remove(), clang::Token::setAnnotationEndLoc(), clang::AttributedTypeLoc::setAttrEnumOperandLoc(), clang::DeclarationNameInfo::setCXXLiteralOperatorNameLoc(), clang::DeclarationNameInfo::setCXXOperatorNameRange(), clang::Token::setLocation(), clang::serialization::DeclOffset::setLocation(), clang::Designator::setRBracketLoc(), clang::Token::startToken(), and clang::TemplateArgumentLocInfo::TemplateArgumentLocInfo().
|
inline |
Definition at line 97 of file SourceLocation.h.
Referenced by clang::edit::EditedSource::clearRewrites(), clang::Parser::Diag(), clang::tooling::DiagnosticMessage::DiagnosticMessage(), clang::DoPrintPreprocessedInput(), getBeginningOfFileToken(), clang::Lexer::GetBeginningOfToken(), clang::SourceManager::getExpansionLoc(), clang::SourceManager::getExpansionRange(), clang::SourceManager::getFileLoc(), clang::edit::Commit::Edit::getFileLocation(), getFunctionSourceLocation(), clang::SourceManager::getImmediateSpellingLoc(), clang::edit::Commit::Edit::getInsertFromRange(), clang::SourceManager::getMacroArgExpandedLocation(), clang::ASTContext::getRawCommentForDeclNoCache(), clang::Lexer::getSourceLocation(), clang::SourceManager::getSpellingLoc(), getTargetEntryUniqueInfo(), clang::Lexer::isAtEndOfMacroExpansion(), isPairOfFileLocations(), clang::TokenLexer::isParsingPreprocessorDirective(), clang::Rewriter::isRewritable(), clang::Lexer::makeFileCharRange(), makeRangeFromFileLocs(), clang::Parser::ParseConstraintExpression(), llvm::DOTGraphTraits< ExplodedNode * >::printLocation(), llvm::DOTGraphTraits< ExplodedNode * >::printLocation2(), clang::VAOptExpansionContext::sawVAOptFollowedByOpeningParens(), SuggestParentheses(), and updateConsecutiveMacroArgTokens().
|
inline |
Definition at line 106 of file SourceLocation.h.
Referenced by clang::Sema::ActOnBaseSpecifier(), clang::Sema::ActOnOpenMPFirstprivateClause(), clang::Sema::ActOnOpenMPScheduleClause(), clang::Sema::ActOnTemplateIdType(), addConstexprToLambdaDeclSpecifier(), addEdgeToPath(), clang::ASTUnit::addFileLevelDecl(), AddRangeLocationAbbrev(), clang::Declarator::AddTypeInfo(), clang::Sema::BuildClassMessage(), clang::Sema::BuildCXXTypeConstructExpr(), clang::Sema::BuildInstanceMessage(), BuildNonArrayForRange(), checkAllProps(), CheckCXX98CompatAccessibleCopy(), clang::Sema::CheckEquivalentExceptionSpec(), CheckImplicitConversion(), CheckLists(), checkNullabilityConsistency(), clang::Sema::CheckSpecializationInstantiationRedecl(), createAttributeInsertion(), clang::CreateModernObjCRewriter(), clang::CreateObjCRewriter(), clang::CodeGen::CGDebugInfo::CreateTempMacroFile(), clang::Parser::Diag(), clang::Sema::DiagnoseEqualityWithExtraParens(), diagnoseLogicalNotOnLHSofCheck(), clang::Sema::diagnoseNullResettableSynthesizedSetters(), DiagnoseSelfAssignment(), clang::Sema::DiagnoseShadowingLambdaDecls(), clang::VerifyDiagnosticConsumer::Directive::Directive(), clang::DiagnosticRenderer::emitDiagnostic(), clang::markup::EmitLocation(), clang::DiagnosticRenderer::emitStoredDiagnostic(), clang::CodeGen::CGOpenMPRuntime::emitUpdateLocation(), extendLeft(), extendRight(), clang::Declarator::ExtendWithDeclSpec(), clang::PPConditionalDirectiveRecord::findConditionalDirectiveRegionLoc(), clang::arcmt::trans::findLocationAfterSemi(), GenerateFixForUnusedDecl(), clang::index::generateUSRForMacro(), clang::Lexer::getAsCharRange(), clang::ModuleMap::getContainingModuleMapFile(), clang::ASTWriter::getDeclID(), clang::SrcMgr::ExpansionInfo::getExpansionLocEnd(), clang::Lexer::getIndentationForLine(), clang::ObjCTypeParamTypeLoc::getLocalSourceRange(), clang::ObjCObjectTypeLoc::getLocalSourceRange(), clang::CXXTemporaryObjectExpr::getLocEnd(), clang::CallExpr::getLocEnd(), clang::MemberExpr::getLocEnd(), clang::InitListExpr::getLocEnd(), clang::Lexer::getLocForEndOfToken(), clang::CallExpr::getLocStart(), clang::CompoundLiteralExpr::getLocStart(), clang::InitListExpr::getLocStart(), clang::DesignatedInitExpr::Designator::getLocStart(), clang::SourceManager::getMacroArgExpandedLocation(), getMissingDeclaratorIdLoc(), clang::Preprocessor::getModuleHeaderToIncludeForDiagnostics(), getNoteDiagForInvalidRedeclaration(), getNullabilityCompletenessCheckFileID(), getPaddingDiagFromTagKind(), clang::SourceManager::getPresumedLoc(), clang::ASTContext::getRawCommentForDeclNoCache(), clang::FunctionDecl::getReturnTypeSourceRange(), clang::ObjCTypeParamDecl::getSourceRange(), clang::DeclaratorChunk::getSourceRange(), clang::ClassTemplateSpecializationDecl::getSourceRange(), getStandardSelLoc(), hasSuperInitCall(), clang::ASTImporter::Import(), clang::index::IndexingContext::importedModule(), clang::index::IndexingContext::indexTopLevelDecl(), clang::UsingDecl::isAccessDeclaration(), clang::UnresolvedUsingValueDecl::isAccessDeclaration(), clang::sema::FunctionScopeInfo::isCoroutine(), clang::OMPClause::isImplicit(), IsInAnyMacroBody(), clang::SourceManager::isInMainFile(), clang::ASTUnit::isInMainFileID(), clang::ASTUnit::isInPreambleFileID(), clang::CXXUnresolvedConstructExpr::isListInitialization(), clang::SrcMgr::ExpansionInfo::isMacroArgExpansion(), isPreprocessedEntityIfInFileID(), clang::ASTReader::isPreprocessedEntityInFileID(), clang::Parser::ObjCTypeParamListScope::leave(), clang::Lexer::makeFileCharRange(), makeRangeFromFileLocs(), makeStandaloneDiagnostic(), clang::ASTUnit::mapLocationFromPreamble(), clang::ASTUnit::mapLocationToPreamble(), clang::Sema::MarkFunctionReferenced(), clang::MarkVarDeclODRUsed(), clang::Sema::notePreviousDefinition(), clang::Parser::ParseUnqualifiedId(), clang::Sema::PerformCopyInitialization(), clang::PrettyStackTraceDecl::print(), PrintExpected(), printLoc(), ReadLineMarkerFlags(), recordNullabilitySeen(), clang::edit::Commit::replaceText(), clang::Sema::RequireCompleteDeclContext(), clang::arcmt::trans::MigrationContext::rewritePropertyAttribute(), rewriteToNSMacroDecl(), scanToNextArgument(), clang::sema::FunctionScopeInfo::setFirstCoroutineStmt(), clang::CXXScopeSpec::SetInvalid(), clang::CodeGen::CGDebugInfo::setLocation(), clang::Declarator::SetRangeBegin(), clang::Declarator::SetRangeEnd(), clang::DiagnosticsEngine::setSeverity(), clang::EnumDecl::setTemplateSpecializationKind(), shouldIgnoreDueToReservedName(), shouldIgnoreMacro(), shouldReportOccurrenceForSystemDeclOnlyMode(), clang::CoverageSourceInfo::SourceRangeSkipped(), clang::StoredDiagnostic::StoredDiagnostic(), clang::Declarator::takeAttributes(), and tryConsumeMutableOrConstexprToken().
|
inline |
Definition at line 98 of file SourceLocation.h.
Referenced by clang::arcmt::trans::MigrationContext::addPropertyAttribute(), checkAllAtProps(), clang::Sema::CheckLogicalOperands(), CheckMoveOnConstruction(), checkRangesForMacroArgExpansion(), clang::Sema::DiagnoseAlwaysNonNullPointer(), DiagnoseBinOpPrecedence(), clang::Sema::DiagnoseCommaOperator(), clang::Sema::DiagnoseEqualityWithExtraParens(), DiagnoseNullConversion(), DiagnoseSelfAssignment(), DiagnoseSwitchLabelsFallthrough(), clang::PreprocessingRecord::findMacroDefinition(), clang::Sema::findMacroSpelling(), clang::Lexer::findNextToken(), clang::arcmt::trans::findSemiAfterLocation(), fixItNullability(), clang::TypedefNameDecl::getAnonDeclWithTypedefName(), getFirstStackedCallToHeaderFile(), clang::SourceManager::getImmediateExpansionRange(), clang::SourceManager::getImmediateMacroCallerLoc(), clang::Lexer::getImmediateMacroName(), clang::Lexer::getImmediateMacroNameForDiagnostics(), clang::Lexer::getIndentationForLine(), getLiteralInfo(), clang::Lexer::getLocForEndOfToken(), getMacroArgExpansionFileIDs(), clang::ento::CheckerContext::getMacroNameOrSpelling(), GetMappedTokenLoc(), clang::ASTContext::getRawCommentForDeclNoCache(), getTopMostMacro(), handleObjCOwnershipTypeAttr(), clang::html::HighlightMacros(), clang::SourceManager::isAtEndOfImmediateMacroExpansion(), clang::Lexer::isAtEndOfMacroExpansion(), clang::SourceManager::isAtStartOfImmediateMacroExpansion(), clang::Lexer::isAtStartOfMacroExpansion(), IsEnumConstOrFromMacro(), IsFromSameFile(), isIdenticalStmt(), IsInAnyMacroBody(), clang::SourceManager::isInSystemMacro(), clang::SourceManager::isMacroArgExpansion(), clang::SourceManager::isMacroBodyExpansion(), IsTailPaddedMemberArray(), LocPropertyAttribute(), lookThroughRangesV3Condition(), LookThroughTransitiveAssignmentsAndCommaOperators(), clang::Lexer::makeFileCharRange(), maybeRecoverWithZeroInitialization(), clang::ento::ConditionBRVisitor::patternMatch(), clang::edit::Commit::replaceText(), retrieveMacroLocation(), clang::arcmt::trans::MigrationContext::rewritePropertyAttribute(), rewriteToNumberLiteral(), clang::CoverageSourceInfo::SourceRangeSkipped(), SuggestInitializationFixit(), updateConsecutiveMacroArgTokens(), and clang::ento::SuppressInlineDefensiveChecksVisitor::VisitNode().
|
inlinestatic |
Definition at line 172 of file SourceLocation.h.
References dump(), isFileID(), isValid(), and SM.
Referenced by clang::tooling::findSelectedASTNodes().
|
inline |
Return true if this is a valid SourceLocation object.
Invalid SourceLocations are often used when events have no corresponding location in the source (e.g. a diagnostic is required for a command line option).
Definition at line 105 of file SourceLocation.h.
Referenced by clang::Sema::ActOnCXXTryBlock(), clang::Sema::ActOnFinishLinkageSpecification(), clang::Sema::ActOnOpenMPOrderedClause(), clang::Sema::ActOnSEHTryBlock(), clang::Sema::ActOnStartNamespaceDef(), clang::Sema::ActOnTemplateParameterList(), clang::Sema::ActOnTypenameType(), clang::Sema::ActOnUsingDirective(), clang::Sema::AddCFAuditedAttribute(), addConstexprToLambdaDeclSpecifier(), addEdgeToPath(), clang::Sema::AddRangeBasedOptnone(), clang::CodeGen::ApplyDebugLocation::ApplyDebugLocation(), assignInheritanceModel(), clang::Sema::BuildBaseInitializer(), clang::Sema::BuildClassMessage(), clang::Sema::BuildCXXFunctionalCastExpr(), clang::Sema::BuildInstanceMessage(), clang::Sema::BuildMemInitializer(), clang::Sema::BuildQualifiedTemplateIdExpr(), BuildRecoveryCallExpr(), clang::ObjCMethodCall::canBeOverridenInSubclass(), clang::Sema::CheckBaseSpecifier(), clang::comments::Sema::checkBlockCommandEmptyParagraph(), clang::Sema::CheckCompletedCoroutineBody(), CheckConstexprDeclStmt(), CheckConstexprFunctionStmt(), clang::Sema::CheckEquivalentExceptionSpec(), clang::CheckEquivalentExceptionSpecImpl(), clang::Sema::CheckExceptionSpecSubset(), clang::Preprocessor::checkModuleIsAvailable(), checkNestingOfRegions(), clang::Sema::CheckPureMethod(), checkScheduleModifiers(), clang::Sema::CheckSpecializationInstantiationRedecl(), CheckTemplateArgumentAddressOfObjectOrFunction(), computeDeclRefDependence(), clang::MemberExpr::Create(), clang::UnresolvedLookupExpr::Create(), clang::DependentScopeDeclRefExpr::Create(), clang::CXXDependentScopeMemberExpr::Create(), clang::UnresolvedMemberExpr::Create(), clang::Preprocessor::CreateString(), clang::CXXMethodDecl::CXXMethodDecl(), clang::Sema::DefineImplicitCopyAssignment(), clang::Sema::DefineImplicitCopyConstructor(), clang::Sema::DefineImplicitDefaultConstructor(), clang::Sema::DefineImplicitDestructor(), clang::Sema::DefineImplicitMoveAssignment(), clang::Sema::DefineImplicitMoveConstructor(), DiagLocForExplicitInstantiation(), clang::Sema::DiagnoseAbsenceOfOverrideControl(), DiagnoseMismatchedNewDelete(), diagnoseObjCARCConversion(), clang::Sema::DiagnoseOwningPropertyGetterSynthesis(), DiagnoseTemplateParameterListArityMismatch(), clang::Sema::DiagnoseUnterminatedPragmaPack(), clang::tooling::DiagnosticMessage::DiagnosticMessage(), clang::CodeGen::CGOpenMPRuntime::emitCall(), clang::DiagnosticRenderer::emitDiagnostic(), clang::TextDiagnostic::emitDiagnosticMessage(), emitNullabilityConsistencyWarning(), clang::DiagnosticRenderer::emitStoredDiagnostic(), EvaluateDefined(), clang::BuiltinTypeLoc::expandBuiltinRange(), clang::NestedNameSpecifierLocBuilder::Extend(), clang::sema::SemaPPCallbacks::FileChanged(), clang::MacroDirective::findDirectiveAtLoc(), fixItNullability(), clang::TypeLoc::getBeginLoc(), clang::SourceManager::getDecomposedIncludedLoc(), clang::CXXMemberCallExpr::getExprLoc(), clang::SourceManager::getFileCharacteristic(), clang::sema::FunctionScopeInfo::getFirstCoroutineStmtKeyword(), getLastStmtLoc(), clang::DeclarationNameInfo::getLocEnd(), clang::CXXFunctionalCastExpr::getLocEnd(), clang::CXXUnresolvedConstructExpr::getLocEnd(), clang::ExportDecl::getLocEnd(), clang::MemberExpr::getLocStart(), clang::CXXUnresolvedConstructExpr::getLocStart(), getMissingDeclaratorIdLoc(), clang::ASTReader::getModuleImportLoc(), clang::OverloadExpr::getNamingClass(), clang::VarDecl::getSourceRange(), clang::ClassTemplateSpecializationDecl::getSourceRange(), clang::TypeDecl::getSourceRange(), getTargetEntryUniqueInfo(), clang::VAOptExpansionContext::getVAOptLoc(), clang::TextDiagnosticPrinter::HandleDiagnostic(), clang::LogDiagnosticPrinter::HandleDiagnostic(), clang::VerifyDiagnosticConsumer::HandleDiagnostic(), handleObjCGCTypeAttr(), handleObjCOwnershipTypeAttr(), clang::MSAsmStmt::hasBraces(), clang::LinkageSpecDecl::hasBraces(), clang::Declarator::hasEllipsis(), clang::ObjCTypeParamDecl::hasExplicitBound(), clang::sema::LambdaScopeInfo::hasPotentialCaptures(), clang::sema::LambdaScopeInfo::hasPotentialThisCapture(), clang::CodeGen::CodeGenModule::imbueXRayAttrs(), clang::TokenLexer::Init(), clang::ASTTemplateKWAndArgsInfo::initializeFrom(), clang::BackendConsumer::InlineAsmDiagHandler(), clang::SourceManager::isAtEndOfImmediateMacroExpansion(), clang::Lexer::isAtEndOfMacroExpansion(), clang::SourceManager::isAtStartOfImmediateMacroExpansion(), clang::Lexer::isAtStartOfMacroExpansion(), clang::SourceManager::isBeforeInTranslationUnit(), clang::FullSourceLoc::isBeforeInTranslationUnitThan(), clang::SanitizerBlacklist::isBlacklistedLocation(), clang::AnalysisDeclContext::isBodyAutosynthesizedFromModelFile(), IsBuiltInOrStandardCXX11Attribute(), IsCommonTypo(), clang::InitListExpr::isExplicit(), clang::Declarator::isFirstDeclarator(), clang::CodeGen::CodeGenModule::isInSanitizerBlacklist(), clang::ento::CallEvent::isInSystemHeader(), clang::ObjCPropertyImplDecl::isIvarNameSpecified(), clang::SrcMgr::ExpansionInfo::isMacroBodyExpansion(), clang::DeclSpec::isModulePrivateSpecified(), clang::diff::isNodeExcluded(), isNonDriverDiag(), clang::LambdaCapture::isPackExpansion(), clang::CXXBaseSpecifier::isPackExpansion(), clang::ObjCDictionaryElement::isPackExpansion(), clang::AttributeList::isPackExpansion(), clang::CXXCtorInitializer::isPackExpansion(), clang::UnresolvedUsingValueDecl::isPackExpansion(), clang::UnresolvedUsingTypenameDecl::isPackExpansion(), isPairOfFileLocations(), clang::TokenLexer::isParsingPreprocessorDirective(), isSameWidthConstantConversion(), clang::DecompositionDeclarator::isSet(), isTargetEnvironment(), clang::MacroDirective::DefInfo::isUndefined(), clang::SourceRange::isValid(), clang::UnqualifiedId::isValid(), clang::Parser::ObjCTypeParamListScope::leave(), clang::TokenLexer::Lex(), clang::CompilerInstance::loadModule(), loadModuleMapForModuleBuild(), clang::Sema::LookupOrCreateLabel(), MatchTemplateParameterKind(), mustSynthesizeSetterGetterMethod(), ParseAlignPragma(), clang::Parser::ParseOpenMPParensExpr(), clang::ento::PathDiagnosticLocation::PathDiagnosticLocation(), clang::ento::PathDiagnosticSpotPiece::PathDiagnosticSpotPiece(), PerformConstructorInitialization(), clang::PrettyStackTraceLoc::print(), clang::PrettyDeclStackTraceEntry::print(), clang::PrettyStackTraceDecl::print(), PrintFloatingLiteral(), clang::TreeTransform< Derived >::RebuildDependentScopeDeclRefExpr(), retrieveMacroLocation(), clang::arcmt::trans::MigrationContext::rewritePropertyAttribute(), rewriteToNSEnumDecl(), clang::comments::BlockCommandComment::setArgs(), clang::comments::HTMLStartTagComment::setAttrs(), clang::DiagnosticsEngine::SetDelayedDiagnostic(), clang::comments::BlockCommandComment::setParagraph(), clang::ClassTemplateSpecializationDecl::setPointOfInstantiation(), clang::VarTemplateSpecializationDecl::setPointOfInstantiation(), clang::LinkageSpecDecl::setRBraceLoc(), clang::VarDecl::setTemplateSpecializationKind(), clang::FunctionDecl::setTemplateSpecializationKind(), clang::EnumDecl::setTemplateSpecializationKind(), clang::VisibleModuleSet::setVisible(), clang::XRayFunctionFilter::shouldImbueLocation(), clang::StoredDiagnostic::StoredDiagnostic(), SuggestParentheses(), takeDeclAttributes(), clang::TreeTransform< Derived >::TemporaryBase::TemporaryBase(), toLevel(), clang::TreeTransform< Derived >::TransformOverloadExprDecls(), tryConsumeMutableOrConstexprToken(), clang::UndefMacroDirective::UndefMacroDirective(), and clang::threadSafety::ThreadSafetyHandler::~ThreadSafetyHandler().
void SourceLocation::print | ( | raw_ostream & | OS, |
const SourceManager & | SM | ||
) | const |
Definition at line 37 of file SourceLocation.cpp.
References clang::PresumedLoc::getColumn(), clang::SourceManager::getExpansionLoc(), clang::PresumedLoc::getFilename(), clang::PresumedLoc::getLine(), clang::SourceManager::getPresumedLoc(), clang::SourceManager::getSpellingLoc(), clang::PresumedLoc::isInvalid(), and print().
Referenced by clang::PrettyStackTraceLoc::print(), clang::PrettyDeclStackTraceEntry::print(), print(), clang::PrettyStackTraceDecl::print(), and llvm::DOTGraphTraits< ExplodedNode * >::printLocation2().
LLVM_DUMP_METHOD std::string SourceLocation::printToString | ( | const SourceManager & | SM | ) | const |
Definition at line 64 of file SourceLocation.cpp.
|
friend |
Definition at line 90 of file SourceLocation.h.
|
friend |
Definition at line 91 of file SourceLocation.h.
|
friend |
Definition at line 89 of file SourceLocation.h.