clang  3.7.0
Public Member Functions | Static Public Member Functions | Friends | List of all members
clang::SourceLocation Class Reference

Encodes a location in the source. The SourceManager can decode this to get at the full include stack, line and column information. More...

#include <SourceLocation.h>

Inheritance diagram for clang::SourceLocation:
[legend]

Public Member Functions

 SourceLocation ()
 
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...
 

Friends

class SourceManager
 
class ASTReader
 
class ASTWriter
 

Detailed Description

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.

Constructor & Destructor Documentation

clang::SourceLocation::SourceLocation ( )
inline

Definition at line 97 of file SourceLocation.h.

Member Function Documentation

LLVM_DUMP_METHOD void SourceLocation::dump ( const SourceManager SM) const
static SourceLocation clang::SourceLocation::getFromPtrEncoding ( const void *  Encoding)
inlinestatic

Turn a pointer encoding of a SourceLocation object back into a real SourceLocation.

Definition at line 170 of file SourceLocation.h.

References getFromRawEncoding().

Referenced by clang::ImplicitCallPoint::getLocation().

static SourceLocation clang::SourceLocation::getFromRawEncoding ( unsigned  Encoding)
inlinestatic

Turn a raw encoding of a SourceLocation object into a real SourceLocation.

See Also
getRawEncoding.

Definition at line 151 of file SourceLocation.h.

References Encoding, and X.

Referenced by clang::ASTWriter::AddDeclarationNameLoc(), checkAllProps(), clang::Lexer::ComputePreamble(), diagnoseRedundantReturnTypeQualifiers(), fillAtomicQualLoc(), clang::DependentDiagnostic::getAccessLoc(), clang::Token::getAnnotationEndLoc(), clang::AttributedTypeLoc::getAttrEnumOperandLoc(), 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::DeclarationNameInfo::getEndLoc(), clang::DeclaratorChunk::FunctionTypeInfo::getExceptionSpecLoc(), clang::SrcMgr::ExpansionInfo::getExpansionLocEnd(), clang::SrcMgr::ExpansionInfo::getExpansionLocStart(), clang::Designator::getFieldLoc(), clang::DesignatedInitExpr::Designator::getFieldLoc(), getFromPtrEncoding(), llvm::PointerLikeTypeTraits< clang::SourceLocation >::getFromVoidPointer(), clang::SrcMgr::FileInfo::getIncludeLoc(), clang::ObjCTypeParamList::getLAngleLoc(), clang::Designator::getLBracketLoc(), clang::DesignatedInitExpr::Designator::getLBracketLoc(), clang::Token::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::TemplateArgumentLocInfo::getTemplateEllipsisLoc(), clang::TemplateArgumentLocInfo::getTemplateNameLoc(), clang::InitializedEntity::getThrowLoc(), clang::DeclaratorChunk::FunctionTypeInfo::getVolatileQualifierLoc(), clang::BackendConsumer::InlineAsmDiagHandler(), clang::SrcMgr::ExpansionInfo::isMacroArgExpansion(), clang::SrcMgr::ExpansionInfo::isMacroBodyExpansion(), clang::ASTReader::ReadMismatchingDeleteExpressions(), clang::ASTReader::ReadPendingInstantiations(), clang::ASTReader::ReadReferencedSelectors(), clang::ASTReader::ReadSourceLocation(), clang::ASTReader::ReadUndefinedButUsed(), clang::ASTReader::ReadUsedVTables(), clang::ASTReader::ReadWeakUndeclaredIdentifiers(), and clang::TreeTransform< Derived >::RebuildCXXOperatorCallExpr().

SourceLocation clang::SourceLocation::getLocWithOffset ( int  Offset) const
inline

Return a source location with the specified offset from this SourceLocation.

Definition at line 133 of file SourceLocation.h.

Referenced by clang::Sema::ActOnComment(), clang::Sema::ActOnPropertyImplDecl(), clang::comments::Sema::actOnVerbatimBlockStart(), clang::comments::Sema::actOnVerbatimLine(), addFixitForObjCARCConversion(), clang::html::AddHeaderFooterInternalBuiltinCSS(), clang::Lexer::AdvanceToTokenCharacter(), applyEditsToTemp(), applyRewrite(), clang::Sema::AtomicPropertySetterGetterRules(), clang::TokenConcatenation::AvoidConcat(), clang::Sema::CheckAssignmentOperands(), CheckMoveOnConstruction(), ConvertBackendLocation(), clang::Preprocessor::EnterSourceFile(), clang::ASTReader::FindFileRegionDecls(), clang::arcmt::trans::findLocationAfterSemi(), clang::Lexer::findLocationAfterToken(), FixDigraph(), clang::Lexer::getAsCharRange(), getBeginningOfFileToken(), 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(), clang::SourceManager::getMacroArgExpandedLocation(), GetMappedTokenLoc(), clang::comments::HTMLStartTagComment::Attribute::getNameLocEnd(), clang::SourceManager::getPresumedLoc(), clang::PTHLexer::getSourceLocation(), clang::Lexer::getSourceLocation(), clang::ASTUnit::PreambleData::getSourceRange(), getStandardSelLoc(), clang::comments::HTMLTagComment::getTagNameSourceRange(), clang::ScratchBuffer::getToken(), clang::Preprocessor::HandleEndOfFile(), clang::ASTImporter::Import(), clang::BackendConsumer::InlineAsmDiagHandler2(), clang::SourceManager::isAtEndOfImmediateMacroExpansion(), clang::Lexer::isAtEndOfMacroExpansion(), isEmptyARCMTMacroStatement(), clang::ASTUnit::mapLocationFromPreamble(), clang::ASTUnit::mapLocationToPreamble(), ParseDirective(), clang::Sema::ParseObjCSelectorExpression(), PrintPreprocessedTokens(), clang::ASTReader::ReadSourceLocation(), clang::format::reformat(), clang::format::WhitespaceManager::replaceWhitespaceInToken(), rewriteToNSEnumDecl(), rewriteToNSMacroDecl(), rewriteToObjCProperty(), clang::SourceManager::translateLineCol(), clang::Sema::tryToRecoverWithCall(), and updateConsecutiveMacroArgTokens().

void* clang::SourceLocation::getPtrEncoding ( ) const
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 162 of file SourceLocation.h.

References getRawEncoding().

Referenced by llvm::PointerLikeTypeTraits< clang::SourceLocation >::getAsVoidPointer().

unsigned clang::SourceLocation::getRawEncoding ( ) const
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 145 of file SourceLocation.h.

Referenced by clang::ASTWriter::AddSourceLocation(), clang::edit::EditedSource::canInsertInOffset(), checkAllAtProps(), checkAllProps(), checkWeakGCAttrs(), clang::Lexer::ComputePreamble(), clang::DependentDiagnostic::Create(), clang::SrcMgr::ExpansionInfo::create(), clang::DeclarationNameLoc::DeclarationNameLoc(), clang::DesignatedInitExpr::Designator::Designator(), clang::CodeGen::CodeGenFunction::EmitAsmStmt(), clang::Designator::getArray(), clang::Designator::getArrayRange(), getAsmSrcLocInfo(), clang::Designator::getField(), clang::DeclaratorChunk::getFunction(), clang::ASTContext::getNameForTemplate(), clang::Sema::GetNameFromUnqualifiedId(), clang::DeclaratorChunk::getPointer(), getPtrEncoding(), clang::Sema::getTypeName(), clang::operator<(), clang::operator==(), clang::ento::BugReport::Profile(), clang::ASTReader::ReadDeclarationNameLoc(), clang::Token::setAnnotationEndLoc(), clang::AttributedTypeLoc::setAttrEnumOperandLoc(), clang::DeclarationNameInfo::setCXXLiteralOperatorNameLoc(), clang::DeclarationNameInfo::setCXXOperatorNameRange(), clang::Token::setLocation(), clang::serialization::DeclOffset::setLocation(), clang::UnqualifiedId::setOperatorFunctionId(), clang::Designator::setRBracketLoc(), clang::Sema::startLambdaDefinition(), clang::Token::startToken(), and clang::TemplateArgumentLocInfo::TemplateArgumentLocInfo().

bool clang::SourceLocation::isFileID ( ) const
inline
bool clang::SourceLocation::isInvalid ( ) const
inline

Definition at line 108 of file SourceLocation.h.

Referenced by clang::Sema::ActOnBaseSpecifier(), clang::Sema::ActOnCXXMemberDeclarator(), clang::Sema::ActOnExplicitInstantiation(), clang::Sema::actOnObjCTypeArgsOrProtocolQualifiers(), clang::Sema::ActOnOpenMPFirstprivateClause(), clang::Sema::ActOnPropertyImplDecl(), clang::Sema::ActOnTemplateTemplateParameter(), addEdgeToPath(), clang::ASTUnit::addFileLevelDecl(), clang::Declarator::AddTypeInfo(), clang::Sema::BuildClassMessage(), clang::Sema::BuildCXXTypeConstructExpr(), clang::Sema::BuildInstanceMessage(), checkAllProps(), clang::Sema::CheckEquivalentExceptionSpec(), checkNullabilityConsistency(), clang::Sema::CheckSpecializationInstantiationRedecl(), checkTypeParamListConsistency(), clang::Lexer::ComputePreamble(), ConvertDeclSpecToType(), clang::Sema::DiagnoseEqualityWithExtraParens(), clang::Sema::diagnoseIgnoredQualifiers(), DiagnoseInvalidRedeclaration(), diagnoseLogicalNotOnLHSofComparison(), clang::Sema::diagnoseNullResettableSynthesizedSetters(), DiagnoseSelfAssignment(), clang::Sema::DiagnoseSentinelCalls(), clang::VerifyDiagnosticConsumer::Directive::Directive(), DoMarkVarDeclReferenced(), clang::DiagnosticRenderer::emitDiagnostic(), clang::CodeGen::CGDebugInfo::EmitFunctionStart(), clang::markup::EmitLocation(), clang::BackendConsumer::EmitOptimizationMessage(), clang::Sema::EmitRelatedResultTypeNoteForReturn(), clang::CXXScopeSpec::Extend(), extendLeft(), extendRight(), clang::Declarator::ExtendWithDeclSpec(), clang::PPConditionalDirectiveRecord::findConditionalDirectiveRegionLoc(), clang::arcmt::trans::findLocationAfterSemi(), clang::DeclSpec::Finish(), GenerateFixForUnusedDecl(), clang::index::generateUSRForMacro(), clang::Lexer::getAsCharRange(), clang::TypeLoc::getBeginLoc(), clang::ModuleMap::getContainingModuleMapFile(), clang::SrcMgr::ExpansionInfo::getExpansionLocEnd(), clang::SourceManager::getFileCharacteristic(), GetFullTypeForDeclarator(), clang::Preprocessor::getLastMacroWithSpelling(), 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(), getNoteDiagForInvalidRedeclaration(), getNullabilityCompletenessCheckFileID(), clang::Sema::getOwningModule(), clang::SourceManager::getPresumedLoc(), clang::ASTContext::getRawCommentForDeclNoCache(), clang::FunctionDecl::getReturnTypeSourceRange(), clang::ObjCTypeParamDecl::getSourceRange(), clang::DeclaratorChunk::getSourceRange(), clang::ClassTemplateSpecializationDecl::getSourceRange(), getStandardSelLoc(), clang::ASTImporter::Import(), clang::ModuleMap::inferModuleFromLocation(), clang::ASTWriter::inferSubmoduleIDFromLocation(), clang::UsingDecl::isAccessDeclaration(), clang::UnresolvedUsingValueDecl::isAccessDeclaration(), clang::SanitizerBlacklist::isBlacklistedLocation(), isEmptyARCMTMacroStatement(), clang::OMPClause::isImplicit(), IsInAnyMacroBody(), clang::SourceManager::isInMainFile(), clang::ASTUnit::isInMainFileID(), clang::ASTUnit::isInPreambleFileID(), clang::CodeGen::CodeGenModule::isInSanitizerBlacklist(), isInvalid(), clang::SrcMgr::ExpansionInfo::isMacroArgExpansion(), isPreprocessedEntityIfInFileID(), clang::ASTReader::isPreprocessedEntityInFileID(), clang::CompilerInstance::loadModule(), clang::Lexer::makeFileCharRange(), makeRangeFromFileLocs(), makeStandaloneDiagnostic(), clang::ASTUnit::mapLocationFromPreamble(), clang::ASTUnit::mapLocationToPreamble(), clang::MarkVarDeclODRUsed(), ParseDirective(), clang::Sema::PerformCopyInitialization(), clang::PrettyStackTraceDecl::print(), printLoc(), ReadLineMarkerFlags(), clang::ASTReader::ReadSLocEntry(), clang::Sema::RequireCompleteDeclContext(), clang::Sema::RequireCompleteExprType(), clang::arcmt::trans::MigrationContext::rewritePropertyAttribute(), rewriteToNSEnumDecl(), clang::CXXScopeSpec::SetInvalid(), clang::CodeGen::CGDebugInfo::setLocation(), clang::Declarator::SetRangeBegin(), clang::Declarator::SetRangeEnd(), clang::DiagnosticsEngine::setSeverity(), clang::EnumDecl::setTemplateSpecializationKind(), shouldIgnoreMacro(), clang::StoredDiagnostic::StoredDiagnostic(), and clang::Declarator::takeAttributes().

bool clang::SourceLocation::isMacroID ( ) const
inline

Definition at line 100 of file SourceLocation.h.

Referenced by clang::arcmt::trans::MigrationContext::addPropertyAttribute(), checkAllAtProps(), clang::Sema::CheckLogicalOperands(), CheckMoveOnConstruction(), CompactPathDiagnostic(), clang::Sema::DiagnoseAlwaysNonNullPointer(), diagnoseBadTypeAttribute(), DiagnoseBinOpPrecedence(), clang::Sema::DiagnoseEqualityWithExtraParens(), DiagnoseSelfAssignment(), DiagnoseSwitchLabelsFallthrough(), clang::Sema::DiagnoseUnusedExprResult(), clang::DiagnosticRenderer::emitDiagnostic(), clang::TextDiagnostic::emitDiagnosticLoc(), clang::Lexer::findLocationAfterToken(), clang::Sema::findMacroSpelling(), clang::arcmt::trans::findSemiAfterLocation(), clang::ento::LikelyFalsePositiveSuppressionBRVisitor::getEndPath(), getFirstStackedCallToHeaderFile(), GetFullTypeForDeclarator(), clang::SourceManager::getImmediateExpansionRange(), clang::SourceManager::getImmediateMacroCallerLoc(), getImmediateMacroName(), clang::Lexer::getImmediateMacroName(), getLiteralInfo(), clang::Lexer::getLocForEndOfToken(), 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(), isEmptyARCMTMacroStatement(), isExpandedFromConfigurationMacro(), IsFromSameFile(), isIdenticalStmt(), IsInAnyMacroBody(), clang::SourceManager::isInSystemMacro(), clang::SourceManager::isMacroArgExpansion(), clang::SourceManager::isMacroBodyExpansion(), IsTailPaddedMemberArray(), LocPropertyAttribute(), clang::Lexer::makeFileCharRange(), mapDiagnosticRanges(), maybeRecoverWithZeroInitialization(), clang::arcmt::trans::MigrationContext::rewritePropertyAttribute(), rewriteToNumberLiteral(), and SuggestInitializationFixit().

bool clang::SourceLocation::isValid ( ) const
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 107 of file SourceLocation.h.

Referenced by clang::Sema::ActOnAliasDeclaration(), clang::Sema::ActOnClassTemplateSpecialization(), clang::Sema::ActOnCXXForRangeIdentifier(), clang::Sema::ActOnCXXMemberDeclarator(), clang::Sema::ActOnCXXTryBlock(), clang::Sema::ActOnDependentTemplateName(), clang::Sema::ActOnFinishLinkageSpecification(), clang::Sema::ActOnIdExpression(), clang::Sema::ActOnModuleImport(), clang::Sema::actOnObjCTypeArgsOrProtocolQualifiers(), clang::Sema::actOnObjCTypeParam(), clang::Sema::ActOnPropertyImplDecl(), clang::Sema::ActOnSEHTryBlock(), clang::Sema::ActOnStartCXXMemberDeclarations(), clang::Sema::ActOnStartLinkageSpecification(), clang::Sema::ActOnStartNamespaceDef(), clang::Sema::ActOnTag(), clang::Sema::ActOnTemplateParameterList(), clang::Sema::ActOnTemplateTemplateParameter(), clang::Sema::ActOnTypenameType(), clang::Sema::ActOnTypeParameter(), clang::Sema::ActOnUsingDirective(), clang::Sema::ActOnVarTemplateSpecialization(), clang::Sema::AddCFAuditedAttribute(), addEdgeToPath(), clang::ento::PathDiagnosticPiece::addRange(), clang::Sema::AddRangeBasedOptnone(), adjustCallLocations(), clang::tooling::Replacement::apply(), applyObjCTypeArgs(), assignInheritanceModel(), clang::GenerateModuleAction::BeginSourceFileAction(), clang::Sema::BuildBaseInitializer(), clang::Sema::BuildClassMessage(), clang::Sema::BuildCXXFunctionalCastExpr(), clang::Sema::BuildInstanceMessage(), clang::Sema::BuildMemInitializer(), clang::Sema::BuildPossibleImplicitMemberExpr(), clang::Sema::BuildQualifiedTemplateIdExpr(), BuildRecoveryCallExpr(), clang::ObjCMethodCall::canBeOverridenInSubclass(), checkARCPropertyImpl(), clang::Sema::CheckBaseSpecifier(), clang::comments::Sema::checkBlockCommandEmptyParagraph(), clang::Sema::CheckClassTemplate(), CheckConstexprDeclStmt(), CheckConstexprFunctionStmt(), clang::Sema::CheckEquivalentExceptionSpec(), clang::Sema::CheckExceptionSpecSubset(), clang::Sema::CheckFieldDecl(), CheckNestingOfRegions(), clang::Sema::checkNullabilityTypeSpecifier(), clang::Sema::CheckPureMethod(), clang::Sema::CheckSpecializationInstantiationRedecl(), CheckTemplateArgumentAddressOfObjectOrFunction(), clang::Sema::CheckTypenameType(), clang::Lexer::ComputePreamble(), clang::DeclRefExpr::Create(), 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(), DiagnosePropertyMismatchDeclInProtocols(), DiagnoseTemplateParameterListArityMismatch(), clang::CodeGen::CodeGenFunction::EmitDeclRefLValue(), clang::DiagnosticRenderer::emitDiagnostic(), clang::TextDiagnostic::emitDiagnosticMessage(), clang::DiagnosticRenderer::emitStoredDiagnostic(), EvaluateDefined(), clang::NestedNameSpecifierLocBuilder::Extend(), clang::MacroDirective::findDirectiveAtLoc(), clang::SourceManager::getDecomposedIncludedLoc(), GetFullTypeForDeclarator(), clang::DeclaratorChunk::getFunction(), clang::Preprocessor::getLastMacroWithSpelling(), getLastStmtLoc(), clang::DeclarationNameInfo::getLocEnd(), clang::CXXConstructExpr::getLocEnd(), clang::CXXFunctionalCastExpr::getLocEnd(), clang::CXXUnresolvedConstructExpr::getLocEnd(), clang::MemberExpr::getLocStart(), clang::SourceManager::getMacroArgExpandedLocation(), getMissingDeclaratorIdLoc(), clang::VarDecl::getSourceRange(), clang::ClassTemplateSpecializationDecl::getSourceRange(), clang::ObjCPropertyImplDecl::getSourceRange(), clang::TagDecl::getSourceRange(), getValidSourceLocation(), handleAvailabilityAttr(), clang::TextDiagnosticPrinter::HandleDiagnostic(), clang::LogDiagnosticPrinter::HandleDiagnostic(), clang::VerifyDiagnosticConsumer::HandleDiagnostic(), clang::Preprocessor::HandleEndOfFile(), handleObjCGCTypeAttr(), handleObjCOwnershipTypeAttr(), clang::LinkageSpecDecl::hasBraces(), clang::Declarator::hasEllipsis(), clang::ObjCTypeParamDecl::hasExplicitBound(), clang::DeclRefExpr::hasExplicitTemplateArgs(), clang::OverloadExpr::hasExplicitTemplateArgs(), clang::MemberExpr::hasExplicitTemplateArgs(), clang::DependentScopeDeclRefExpr::hasExplicitTemplateArgs(), clang::CXXDependentScopeMemberExpr::hasExplicitTemplateArgs(), clang::DeclaratorChunk::FunctionTypeInfo::hasMutableQualifier(), clang::sema::LambdaScopeInfo::hasPotentialCaptures(), clang::sema::LambdaScopeInfo::hasPotentialThisCapture(), clang::DeclaratorChunk::FunctionTypeInfo::hasRefQualifier(), clang::DeclRefExpr::hasTemplateKeyword(), clang::OverloadExpr::hasTemplateKeyword(), clang::MemberExpr::hasTemplateKeyword(), clang::DependentScopeDeclRefExpr::hasTemplateKeyword(), clang::CXXDependentScopeMemberExpr::hasTemplateKeyword(), clang::TokenLexer::Init(), clang::ASTTemplateKWAndArgsInfo::initializeFrom(), clang::BackendConsumer::InlineAsmDiagHandler(), clang::BackendConsumer::InlineAsmDiagHandler2(), clang::SourceManager::isAtEndOfImmediateMacroExpansion(), clang::Lexer::isAtEndOfMacroExpansion(), clang::SourceManager::isAtStartOfImmediateMacroExpansion(), clang::Lexer::isAtStartOfMacroExpansion(), clang::SourceManager::isBeforeInTranslationUnit(), clang::FullSourceLoc::isBeforeInTranslationUnitThan(), clang::InitListExpr::isExplicit(), clang::Declarator::isFirstDeclarator(), clang::SrcMgr::ExpansionInfo::isFunctionMacroExpansion(), clang::Sema::isIncompatibleTypedef(), clang::ento::CallEvent::isInSystemHeader(), clang::ObjCPropertyImplDecl::isIvarNameSpecified(), clang::SrcMgr::ExpansionInfo::isMacroArgExpansion(), clang::SrcMgr::ExpansionInfo::isMacroBodyExpansion(), clang::DeclSpec::isModulePrivateSpecified(), isNonDriverDiag(), clang::LambdaCapture::isPackExpansion(), clang::CXXBaseSpecifier::isPackExpansion(), clang::ObjCDictionaryElement::isPackExpansion(), clang::AttributeList::isPackExpansion(), clang::CXXCtorInitializer::isPackExpansion(), clang::MacroDirective::DefInfo::isUndefined(), clang::SourceRange::isValid(), clang::UnqualifiedId::isValid(), clang::VisibleModuleSet::isVisible(), clang::TokenLexer::Lex(), clang::CompilerInstance::loadModule(), clang::Sema::LookupOrCreateLabel(), clang::Sema::MarkMemberReferenced(), MatchTemplateParameterKind(), clang::Sema::MatchTemplateParametersToScopeSpecifier(), clang::Sema::MergeTypedefNameDecl(), clang::OverloadExpr::OverloadExpr(), clang::ento::PathDiagnosticSpotPiece::PathDiagnosticSpotPiece(), PerformConstructorInitialization(), clang::PrettyStackTraceLoc::print(), clang::PrettyDeclStackTraceEntry::print(), print(), clang::PrettyStackTraceDecl::print(), clang::TreeTransform< Derived >::RebuildDependentScopeDeclRefExpr(), clang::arcmt::trans::MigrationContext::rewritePropertyAttribute(), clang::comments::BlockCommandComment::setArgs(), clang::comments::HTMLStartTagComment::setAttrs(), clang::comments::BlockCommandComment::setParagraph(), clang::ClassTemplateSpecializationDecl::setPointOfInstantiation(), clang::VarTemplateSpecializationDecl::setPointOfInstantiation(), clang::LinkageSpecDecl::setRBraceLoc(), clang::DiagnosticsEngine::setSeverity(), clang::VirtSpecifiers::SetSpecifier(), clang::VarDecl::setTemplateSpecializationKind(), clang::FunctionDecl::setTemplateSpecializationKind(), clang::EnumDecl::setTemplateSpecializationKind(), clang::StoredDiagnostic::StoredDiagnostic(), SuggestParentheses(), clang::TreeTransform< Derived >::TemporaryBase::TemporaryBase(), translateTemplateArgument(), clang::UndefMacroDirective::UndefMacroDirective(), clang::ento::FindLastStoreBRVisitor::VisitNode(), and WarnUndefinedMethod().

void SourceLocation::print ( raw_ostream &  OS,
const SourceManager SM 
) const
LLVM_DUMP_METHOD std::string SourceLocation::printToString ( const SourceManager SM) const

Definition at line 65 of file SourceLocation.cpp.

Friends And Related Function Documentation

friend class ASTReader
friend

Definition at line 90 of file SourceLocation.h.

friend class ASTWriter
friend

Definition at line 91 of file SourceLocation.h.

friend class SourceManager
friend

Definition at line 89 of file SourceLocation.h.


The documentation for this class was generated from the following files: