clang API Documentation

Public Member Functions
clang::SourceRange Class Reference

A trivial tuple used to represent a source range. More...

#include <SourceLocation.h>

Inheritance diagram for clang::SourceRange:
Inheritance graph
[legend]

List of all members.

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

Detailed Description

A trivial tuple used to represent a source range.

Definition at line 192 of file SourceLocation.h.


Constructor & Destructor Documentation

Definition at line 196 of file SourceLocation.h.

Definition at line 197 of file SourceLocation.h.

Definition at line 198 of file SourceLocation.h.


Member Function Documentation

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

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]
bool clang::SourceRange::isValid ( ) const [inline]
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.


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