clang API Documentation
A trivial tuple used to represent a source range. More...
#include <SourceLocation.h>
Public Member Functions | |
SourceRange () | |
SourceRange (SourceLocation loc) | |
SourceRange (SourceLocation begin, SourceLocation end) | |
SourceLocation | getBegin () const |
SourceLocation | getEnd () const |
void | setBegin (SourceLocation b) |
void | setEnd (SourceLocation e) |
bool | isValid () const |
bool | isInvalid () const |
bool | operator== (const SourceRange &X) const |
bool | operator!= (const SourceRange &X) const |
A trivial tuple used to represent a source range.
Definition at line 192 of file SourceLocation.h.
clang::SourceRange::SourceRange | ( | ) | [inline] |
Definition at line 196 of file SourceLocation.h.
clang::SourceRange::SourceRange | ( | SourceLocation | loc | ) | [inline] |
Definition at line 197 of file SourceLocation.h.
clang::SourceRange::SourceRange | ( | SourceLocation | begin, |
SourceLocation | end | ||
) | [inline] |
Definition at line 198 of file SourceLocation.h.
SourceLocation clang::SourceRange::getBegin | ( | ) | const [inline] |
Definition at line 200 of file SourceLocation.h.
Referenced by clang::Sema::ActOnBaseSpecifier(), clang::Sema::ActOnComment(), clang::Sema::ActOnCXXNestedNameSpecifier(), clang::Sema::ActOnFriendFunctionDecl(), clang::Sema::ActOnMemberAccessExpr(), clang::Sema::ActOnObjCExceptionDecl(), clang::Sema::ActOnStartOfLambdaDefinition(), clang::Sema::ActOnTag(), clang::Sema::ActOnUsingDeclaration(), clang::Sema::AddAlignedAttr(), clang::Sema::AddAlignValueAttr(), clang::Sema::AddAssumeAlignedAttr(), addBlockPointerConversion(), clang::ASTContext::addComment(), addFixitForObjCARCConversion(), addFunctionPointerConversion(), clang::PreprocessingRecord::addPreprocessedEntity(), clang::ASTWriter::AddSourceRange(), clang::format::ContinuationIndenter::addTokenToState(), clang::Sema::BuildArrayType(), clang::Sema::BuildBaseInitializer(), clang::Sema::BuildClassMessage(), clang::Sema::BuildCXXNew(), clang::Sema::BuildDelegatingInitializer(), clang::Sema::BuildImplicitMemberExpr(), clang::Sema::BuildMemberInitializer(), clang::Sema::BuildMemberReferenceExpr(), clang::Sema::BuildObjCArrayLiteral(), clang::Sema::BuildObjCBoxedExpr(), clang::Sema::BuildObjCDictionaryLiteral(), clang::Sema::BuildPseudoDestructorExpr(), clang::Sema::CheckAddressOfOperand(), checkAvailabilityAttr(), clang::Sema::CheckCastAlign(), clang::Sema::CheckCompatibleReinterpretCast(), clang::Sema::CheckExceptionSpecCompatibility(), clang::Sema::CheckExtVectorCast(), clang::Sema::CheckFriendTypeDecl(), CheckMemorySizeofForComparison(), clang::Sema::CheckMessageArgumentTypes(), clang::Sema::checkMSInheritanceAttrOnDefinition(), CheckNonTypeTemplatePartialSpecializationArgs(), clang::Sema::CheckObjCARCConversion(), clang::Sema::CheckSpecifiedExceptionType(), clang::Sema::CheckTemplateArgument(), clang::Sema::CheckTemplateTypeArgument(), clang::Sema::CheckTypenameType(), clang::Sema::CheckUsingDeclQualifier(), clang::Sema::CheckVectorCast(), clang::arcmt::CapturedDiagList::clearDiagnostic(), comparePiece(), clang::InitializationKind::CreateCast(), clang::InitializationKind::CreateCStyleCast(), clang::InitializationKind::CreateFunctionalCast(), clang::Sema::createLambdaClosureType(), clang::InitializationSequence::Diagnose(), DiagnoseAccessPath(), clang::Sema::DiagnoseAlwaysNonNullPointer(), diagnoseBadCast(), diagnoseDynamicExceptionSpecification(), clang::Sema::DiagnoseEqualityWithExtraParens(), diagnoseInstanceReference(), diagnoseObjCARCConversion(), DiagnoseReinterpretUpDownCast(), clang::Sema::diagnoseTypo(), clang::Sema::DiagnoseUnexpandedParameterPack(), clang::Sema::DiagnoseUnknownTypeName(), DiagUninitUse(), doRewriteToUTF8StringBoxedExpressionHelper(), clang::CodeGen::CodeGenFunction::EmitObjCForCollectionStmt(), clang::CodeGen::CodeGenFunction::EmitOMPSimdDirective(), clang::Sema::EmitRelatedResultTypeNoteForReturn(), clang::CXXScopeSpec::Extend(), clang::Declarator::ExtendWithDeclSpec(), clang::ASTReader::findPreprocessedEntitiesInRange(), GCRewriteFinalize(), clang::CodeGen::CodeGenFunction::GenerateCode(), clang::ObjCBoxedExpr::getAtLoc(), clang::CharSourceRange::getBegin(), clang::CXXScopeSpec::getBeginLoc(), clang::TypeLoc::getBeginLoc(), clang::NestedNameSpecifierLoc::getBeginLoc(), GetDeclSpecTypeForDeclarator(), clang::NonTypeTemplateParmDecl::getDefaultArgumentLoc(), getGenericLambdaTemplateParameterList(), clang::DependentFunctionTemplateSpecializationInfo::getLAngleLoc(), getLengthOnSingleLine(), getLiteralInfo(), clang::AttributeList::getLoc(), clang::NestedNameSpecifierLoc::getLocalBeginLoc(), clang::Attr::getLocation(), clang::CXXOperatorCallExpr::getLocStart(), clang::RawComment::getLocStart(), clang::ObjCBoxedExpr::getLocStart(), clang::ObjCArrayLiteral::getLocStart(), clang::CXXBaseSpecifier::getLocStart(), clang::comments::Comment::getLocStart(), clang::ObjCDictionaryLiteral::getLocStart(), clang::Decl::getLocStart(), clang::DeclSpec::getLocStart(), clang::CXXTypeidExpr::getLocStart(), clang::CXXUuidofExpr::getLocStart(), clang::LambdaExpr::getLocStart(), clang::Declarator::getLocStart(), clang::OffsetOfExpr::OffsetOfNode::getLocStart(), clang::CXXNoexceptExpr::getLocStart(), clang::ento::CallEvent::getProgramPoint(), clang::Rewriter::getRewrittenText(), clang::NestedNameSpecifierLoc::getSourceRange(), clang::CXXNewExpr::getStartLoc(), clang::VerifyDiagnosticConsumer::HandleComment(), handleDLLAttr(), handleFallThroughAttr(), handleVisibilityAttr(), clang::arcmt::CapturedDiagList::hasDiagnostic(), clang::html::HighlightRange(), clang::ASTImporter::Import(), isPreprocessedEntityIfInFileID(), clang::CodeGen::CodeGenFunction::LexicalScope::LexicalScope(), LookupMemberExpr(), clang::NestedNameSpecifierLocBuilder::MakeTrivial(), clang::ASTUnit::mapRangeFromPreamble(), clang::ASTUnit::mapRangeToPreamble(), clang::Sema::MaybeSuggestAddingStaticToDecl(), clang::Sema::mergeAvailabilityAttr(), clang::Sema::mergeDLLImportAttr(), clang::Sema::mergeMSInheritanceAttr(), clang::Sema::mergeSectionAttr(), mergeVisibilityAttr(), objectifyExpr(), clang::BeforeThanCompare< SourceRange >::operator()(), clang::RawComment::parse(), clang::InitializationSequence::Perform(), clang::Sema::PerformObjectMemberConversion(), ProcessStmtAttribute(), clang::Sema::ProcessStmtAttributes(), clang::ento::BugReport::Profile(), clang::PseudoDestructorTypeStorage::PseudoDestructorTypeStorage(), clang::PPConditionalDirectiveRecord::rangeIntersectsConditionalDirective(), clang::RawComment::RawComment(), clang::ASTReader::ReadNestedNameSpecifierLoc(), clang::TreeTransform< Derived >::RebuildArrayType(), clang::TreeTransform< Derived >::RebuildCXXNoexceptExpr(), clang::Sema::RebuildNestedNameSpecifierInCurrentInstantiation(), clang::Rewriter::RemoveText(), clang::Rewriter::ReplaceText(), clang::Sema::RequireCompleteDeclContext(), clang::Sema::ResolveAndFixSingleFunctionTemplateSpecialization(), clang::comments::Sema::resolveParamCommandIndexes(), rewriteToArraySubscriptSet(), rewriteToBoolLiteral(), rewriteToCharLiteral(), rewriteToDictionaryLiteral(), rewriteToDictionarySubscriptSet(), rewriteToNumberLiteral(), rewriteToNumericBoxedExpression(), rewriteToSubscriptGetCommon(), clang::Token::setAnnotationRange(), clang::IfStmt::setConditionVariable(), clang::SwitchStmt::setConditionVariable(), clang::WhileStmt::setConditionVariable(), clang::ForStmt::setConditionVariable(), clang::DeclarationNameInfo::setCXXOperatorNameRange(), clang::CXXScopeSpec::SetInvalid(), clang::TypeofLikeTypeLoc< TypeOfTypeLoc, TypeOfType, TypeOfTypeLocInfo >::setParensRange(), clang::UnaryTransformTypeLoc::setParensRange(), clang::AtomicTypeLoc::setParensRange(), clang::ObjCMessageExpr::setSourceRange(), clang::Sema::startLambdaDefinition(), SuggestParentheses(), clang::TreeTransform< Derived >::TransformCXXNamedCastExpr(), clang::TreeTransform< Derived >::TransformInitializer(), tryDiagnoseOverloadedCast(), TryReinterpretCast(), TryStaticDowncast(), TryStaticImplicitCast(), TryStaticMemberPointerUpcast(), clang::ConversionFixItGenerator::tryToFixConversion(), and warnAboutAmbiguousFunction().
SourceLocation clang::SourceRange::getEnd | ( | ) | const [inline] |
Definition at line 201 of file SourceLocation.h.
Referenced by clang::Sema::ActOnFunctionDeclarator(), clang::Sema::ActOnStartOfLambdaDefinition(), addFixitForObjCARCConversion(), clang::ASTWriter::AddNestedNameSpecifierLoc(), clang::ASTWriter::AddSourceRange(), clang::format::ContinuationIndenter::addTokenToState(), clang::Sema::BuildBaseInitializer(), clang::Sema::BuildCompoundLiteralExpr(), clang::Sema::BuildCXXNamedCast(), clang::Sema::BuildCXXNew(), clang::Sema::BuildDelegatingInitializer(), clang::Sema::BuildMemberInitializer(), clang::Sema::BuildMemInitializer(), clang::comments::Sema::checkBlockCommandEmptyParagraph(), CheckMemorySizeofForComparison(), clang::Sema::CheckPureMethod(), clang::arcmt::CapturedDiagList::clearDiagnostic(), comparePiece(), ConvertDeducedTemplateArgument(), clang::InitializationKind::CreateCast(), clang::InitializationKind::CreateCStyleCast(), clang::InitializationKind::CreateFunctionalCast(), clang::Sema::CreateUnaryExprOrTypeTraitExpr(), clang::CXXNewExpr::CXXNewExpr(), clang::Sema::DiagnoseAssignmentAsCondition(), clang::Sema::DiagnoseEqualityWithExtraParens(), DiagnoseInvalidRedeclaration(), clang::CodeGen::CodeGenFunction::EmitObjCForCollectionStmt(), clang::CodeGen::CodeGenFunction::EmitOMPSimdDirective(), clang::Declarator::ExtendWithDeclSpec(), clang::ASTReader::findPreprocessedEntitiesInRange(), clang::Sema::FinishTemplateArgumentDeduction(), GCRewriteFinalize(), clang::CodeGen::CodeGenFunction::GenerateCode(), clang::Decl::getBodyRBrace(), clang::CharSourceRange::getEnd(), clang::CXXScopeSpec::getEndLoc(), clang::TypeLoc::getEndLoc(), clang::NestedNameSpecifierLoc::getEndLoc(), clang::CXXNewExpr::getEndLoc(), getGenericLambdaTemplateParameterList(), getLengthOnSingleLine(), getLiteralInfo(), clang::NestedNameSpecifierLoc::getLocalEndLoc(), clang::CXXOperatorCallExpr::getLocEnd(), clang::RawComment::getLocEnd(), clang::ObjCBoxedExpr::getLocEnd(), clang::ObjCArrayLiteral::getLocEnd(), clang::CXXBaseSpecifier::getLocEnd(), clang::comments::Comment::getLocEnd(), clang::ObjCDictionaryLiteral::getLocEnd(), clang::Decl::getLocEnd(), clang::DeclSpec::getLocEnd(), clang::CXXTypeidExpr::getLocEnd(), clang::CXXUuidofExpr::getLocEnd(), clang::CXXConstructExpr::getLocEnd(), clang::CXXTemporaryObjectExpr::getLocEnd(), clang::Declarator::getLocEnd(), clang::OffsetOfExpr::OffsetOfNode::getLocEnd(), clang::CXXNoexceptExpr::getLocEnd(), clang::DependentFunctionTemplateSpecializationInfo::getRAngleLoc(), clang::FunctionDecl::getReturnTypeSourceRange(), clang::Rewriter::getRewrittenText(), clang::TemplateDecl::getSourceRange(), clang::NestedNameSpecifierLoc::getSourceRange(), clang::ParmVarDecl::getSourceRange(), clang::TemplateTemplateParmDecl::getSourceRange(), clang::format::FormatToken::getStartOfNonWhitespace(), clang::VerifyDiagnosticConsumer::HandleComment(), handleFallThroughAttr(), clang::arcmt::CapturedDiagList::hasDiagnostic(), clang::html::HighlightRange(), clang::ASTImporter::Import(), LookupMemberExprInRecord(), clang::NestedNameSpecifierLocBuilder::MakeTrivial(), clang::ASTUnit::mapRangeFromPreamble(), clang::ASTUnit::mapRangeToPreamble(), clang::InitializationSequence::Perform(), clang::ento::BugReport::Profile(), clang::PPConditionalDirectiveRecord::rangeIntersectsConditionalDirective(), clang::RawComment::RawComment(), clang::ASTReader::ReadNestedNameSpecifierLoc(), clang::TreeTransform< Derived >::RebuildCXXNoexceptExpr(), clang::Rewriter::ReplaceText(), rewriteToArraySubscriptSet(), rewriteToDictionaryLiteral(), rewriteToDictionarySubscriptSet(), rewriteToSubscriptGetCommon(), clang::Token::setAnnotationRange(), clang::comments::HTMLStartTagComment::setAttrs(), clang::IfStmt::setConditionVariable(), clang::SwitchStmt::setConditionVariable(), clang::WhileStmt::setConditionVariable(), clang::ForStmt::setConditionVariable(), clang::DeclarationNameInfo::setCXXOperatorNameRange(), clang::CXXScopeSpec::SetInvalid(), clang::TypeofLikeTypeLoc< TypeOfTypeLoc, TypeOfType, TypeOfTypeLocInfo >::setParensRange(), clang::UnaryTransformTypeLoc::setParensRange(), clang::AtomicTypeLoc::setParensRange(), clang::ObjCMessageExpr::setSourceRange(), clang::Sema::startLambdaDefinition(), SuggestParentheses(), clang::TreeTransform< Derived >::TransformCXXNamedCastExpr(), clang::TreeTransform< Derived >::TransformInitializer(), clang::ConversionFixItGenerator::tryToFixConversion(), clang::Sema::tryToRecoverWithCall(), clang::TemplateDeclInstantiator::VisitFunctionDecl(), warnAboutAmbiguousFunction(), and clang::CodeGen::CodeGenFunction::LexicalScope::~LexicalScope().
bool clang::SourceRange::isInvalid | ( | ) | const [inline] |
Definition at line 207 of file SourceLocation.h.
References isValid().
Referenced by clang::Sema::CheckARCMethodDecl(), clang::Sema::CheckMessageArgumentTypes(), clang::arcmt::CapturedDiagList::clearDiagnostic(), clang::ASTReader::findPreprocessedEntitiesInRange(), clang::PreprocessingRecord::getPreprocessedEntitiesInRange(), clang::FunctionDecl::getReturnTypeSourceRange(), clang::arcmt::CapturedDiagList::hasDiagnostic(), clang::PPConditionalDirectiveRecord::rangeIntersectsConditionalDirective(), clang::Rewriter::ReplaceText(), and clang::TreeTransform< Derived >::TransformInitializer().
bool clang::SourceRange::isValid | ( | ) | const [inline] |
Definition at line 206 of file SourceLocation.h.
References clang::SourceLocation::isValid().
Referenced by clang::Sema::ActOnAtEnd(), clang::Sema::ActOnCXXNestedNameSpecifier(), clang::Sema::ActOnFunctionDeclarator(), clang::ento::BugReport::addRange(), clang::ento::PathDiagnosticPiece::addRange(), clang::Sema::BuildCXXNew(), clang::Sema::BuildImplicitMemberExpr(), clang::Sema::BuildMemberReferenceExpr(), clang::Sema::CheckMain(), CheckNonTypeTemplatePartialSpecializationArgs(), clang::Sema::CheckObjCARCConversion(), clang::CXXNewExpr::CXXNewExpr(), diagnoseObjCARCConversion(), clang::CXXConstructExpr::getLocEnd(), clang::ParmVarDecl::getSourceRange(), handleGlobalAttr(), clang::CXXScopeSpec::isEmpty(), isInvalid(), clang::CXXNewExpr::isParenTypeId(), clang::CharSourceRange::isValid(), clang::ento::PathDiagnosticLocation::PathDiagnosticLocation(), clang::ento::BugReport::Profile(), and clang::CXXScopeSpec::SetInvalid().
bool clang::SourceRange::operator!= | ( | const SourceRange & | X | ) | const [inline] |
Definition at line 213 of file SourceLocation.h.
bool clang::SourceRange::operator== | ( | const SourceRange & | X | ) | const [inline] |
Definition at line 209 of file SourceLocation.h.
void clang::SourceRange::setBegin | ( | SourceLocation | b | ) | [inline] |
Definition at line 203 of file SourceLocation.h.
Referenced by clang::Sema::ActOnCXXNestedNameSpecifier(), clang::Sema::ActOnOpenMPReductionClause(), clang::Sema::ActOnPackExpansion(), clang::InitializationSequence::Diagnose(), diagnoseInstanceReference(), clang::CXXScopeSpec::Extend(), clang::Declarator::ExtendWithDeclSpec(), FixDigraph(), clang::CXXScopeSpec::MakeSuper(), clang::CharSourceRange::setBegin(), clang::CXXScopeSpec::setBeginLoc(), clang::TypoCorrection::setCorrectionRange(), clang::CXXScopeSpec::SetInvalid(), clang::Declarator::SetRangeBegin(), and clang::DeclSpec::SetRangeStart().
void clang::SourceRange::setEnd | ( | SourceLocation | e | ) | [inline] |
Definition at line 204 of file SourceLocation.h.
Referenced by clang::Sema::ActOnOpenMPReductionClause(), clang::CXXNewExpr::CXXNewExpr(), clang::CXXScopeSpec::Extend(), clang::Declarator::ExtendWithDeclSpec(), FixDigraph(), clang::AttributedTypeLoc::getLocalSourceRange(), clang::CXXScopeSpec::MakeSuper(), clang::comments::HTMLStartTagComment::setAttrs(), clang::TypoCorrection::setCorrectionRange(), clang::CharSourceRange::setEnd(), clang::CXXScopeSpec::setEndLoc(), clang::comments::HTMLStartTagComment::setGreaterLoc(), clang::CXXScopeSpec::SetInvalid(), clang::DeclSpec::SetRangeEnd(), and clang::Declarator::SetRangeEnd().