clang  5.0.0
Public Member Functions | List of all members
clang::SourceRange Class Reference

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

#include "clang/Basic/SourceLocation.h"

Inheritance diagram for clang::SourceRange:
[legend]

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 193 of file SourceLocation.h.

Constructor & Destructor Documentation

clang::SourceRange::SourceRange ( )
inline

Definition at line 197 of file SourceLocation.h.

clang::SourceRange::SourceRange ( SourceLocation  loc)
inline

Definition at line 198 of file SourceLocation.h.

clang::SourceRange::SourceRange ( SourceLocation  begin,
SourceLocation  end 
)
inline

Definition at line 199 of file SourceLocation.h.

Member Function Documentation

SourceLocation clang::SourceRange::getBegin ( ) const
inline

Definition at line 201 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::actOnObjCTypeArgsAndProtocolQualifiers(), clang::Sema::ActOnOpenMPDeclareSimdDirective(), clang::Sema::ActOnOpenMPLastprivateClause(), clang::Sema::ActOnStartOfLambdaDefinition(), clang::Sema::ActOnSuperClassOfClassInterface(), clang::Sema::ActOnTag(), clang::Sema::ActOnUsingDeclaration(), clang::Sema::AddAlignedAttr(), clang::Sema::AddAlignValueAttr(), clang::Sema::AddAllocAlignAttr(), clang::Sema::AddAssumeAlignedAttr(), addBlockPointerConversion(), clang::ASTContext::addComment(), addFixitForObjCARCConversion(), addFunctionPointerConversion(), clang::Sema::AddModeAttr(), clang::Sema::AddParameterABIAttr(), 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(), checkAttrMutualExclusion(), checkAvailabilityAttr(), clang::Sema::CheckCastAlign(), clang::Sema::CheckCompatibleReinterpretCast(), clang::Sema::CheckConversionDeclarator(), clang::Sema::CheckExceptionSpecCompatibility(), clang::Sema::CheckExtVectorCast(), clang::Sema::CheckFriendTypeDecl(), clang::Sema::CheckLiteralOperatorDeclaration(), checkLiteralOperatorTemplateParameterList(), CheckMemorySizeofForComparison(), clang::Sema::CheckMessageArgumentTypes(), clang::Sema::checkMSInheritanceAttrOnDefinition(), CheckNonTypeTemplatePartialSpecializationArgs(), clang::Sema::CheckObjCConversion(), checkObjCMethodX86VectorTypes(), clang::Sema::CheckSpecifiedExceptionType(), clang::Sema::CheckTemplateArgument(), clang::Sema::CheckTemplateTypeArgument(), clang::Sema::CheckTypenameType(), checkTypeParamListConsistency(), clang::Sema::checkUnknownAnyCast(), clang::Sema::CheckUsingDeclQualifier(), clang::Sema::CheckVectorCast(), clang::arcmt::CapturedDiagList::clearDiagnostic(), comparePiece(), clang::InitializationKind::CreateCast(), clang::InitializationKind::CreateCStyleCast(), clang::InitializationKind::CreateFunctionalCast(), clang::Sema::createLambdaClosureType(), clang::Sema::deduceVarTypeFromInitializer(), clang::InitializationSequence::Diagnose(), DiagnoseAccessPath(), clang::Sema::DiagnoseAlwaysNonNullPointer(), diagnoseBadCast(), DiagnoseCallingConvCast(), DiagnoseConstAssignment(), diagnoseDynamicExceptionSpecification(), clang::Sema::DiagnoseEqualityWithExtraParens(), diagnoseInstanceReference(), clang::Sema::DiagnoseMultipleMethodInGlobalPool(), diagnoseObjCARCConversion(), DiagnoseReinterpretUpDownCast(), clang::Sema::diagnoseTypo(), clang::Sema::DiagnoseUnexpandedParameterPack(), clang::Sema::DiagnoseUnknownTypeName(), DiagUninitUse(), doRewriteToUTF8StringBoxedExpressionHelper(), clang::CodeGen::CodeGenFunction::EmitCXXForRangeStmt(), clang::CodeGen::CodeGenFunction::EmitDoStmt(), clang::CodeGen::CodeGenFunction::EmitForStmt(), clang::CodeGen::CodeGenFunction::EmitObjCForCollectionStmt(), clang::CodeGen::CodeGenFunction::EmitOMPInnerLoop(), clang::Sema::EmitRelatedResultTypeNoteForReturn(), clang::Preprocessor::EnterAnnotationToken(), clang::BuiltinTypeLoc::expandBuiltinRange(), clang::CXXScopeSpec::Extend(), extendLeft(), extendRight(), clang::Declarator::ExtendWithDeclSpec(), clang::ASTReader::findPreprocessedEntitiesInRange(), clang::DeclSpec::Finish(), GCRewriteFinalize(), clang::CodeGen::CodeGenFunction::GenerateCode(), clang::Lexer::getAsCharRange(), clang::ObjCBoxedExpr::getAtLoc(), clang::CharSourceRange::getBegin(), clang::CXXScopeSpec::getBeginLoc(), clang::TypeLoc::getBeginLoc(), clang::NestedNameSpecifierLoc::getBeginLoc(), clang::BuiltinTypeLoc::getBuiltinLoc(), GetDeclSpecTypeForDeclarator(), clang::NonTypeTemplateParmDecl::getDefaultArgumentLoc(), clang::SourceManager::getExpansionRange(), clang::DeclaratorChunk::getFunction(), getGenericLambdaTemplateParameterList(), clang::VariableArrayType::getLBracketLoc(), clang::DependentSizedArrayType::getLBracketLoc(), getLengthOnSingleLine(), getLiteralInfo(), clang::AttributeList::getLoc(), clang::NestedNameSpecifierLoc::getLocalBeginLoc(), clang::Attr::getLocation(), clang::MacroDefinitionRecord::getLocation(), clang::TemplateArgumentLoc::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::OffsetOfNode::getLocStart(), clang::CXXNoexceptExpr::getLocStart(), clang::ento::CallEvent::getProgramPoint(), clang::Rewriter::getRewrittenText(), clang::NestedNameSpecifierLoc::getSourceRange(), clang::CXXNewExpr::getStartLoc(), clang::DeclSpec::getTypeSpecWidthLoc(), clang::VerifyDiagnosticConsumer::HandleComment(), handleDLLAttr(), handleFallThroughAttr(), handleOpenCLUnrollHint(), 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::mergeAlwaysInlineAttr(), clang::Sema::mergeAvailabilityAttr(), clang::Sema::mergeDLLImportAttr(), mergeInterfaceMethodToImpl(), clang::Sema::mergeInternalLinkageAttr(), clang::Sema::mergeMinSizeAttr(), clang::Sema::mergeMSInheritanceAttr(), clang::Sema::mergeOptimizeNoneAttr(), clang::Sema::mergeSectionAttr(), clang::Sema::mergeUuidAttr(), mergeVisibilityAttr(), objectifyExpr(), clang::format::WhitespaceManager::Change::IsBeforeInFile::operator()(), clang::BeforeThanCompare< SourceRange >::operator()(), clang::RawComment::parse(), clang::InitializationSequence::Perform(), clang::Sema::PerformObjectMemberConversion(), ProcessStmtAttribute(), clang::Sema::ProcessStmtAttributes(), 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(), rewriteToNSMacroDecl(), 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(), warnAboutAmbiguousFunction(), and warnBracedScalarInit().

SourceLocation clang::SourceRange::getEnd ( ) const
inline

Definition at line 202 of file SourceLocation.h.

Referenced by clang::Sema::ActOnFunctionDeclarator(), clang::Sema::ActOnStartOfLambdaDefinition(), clang::Sema::ActOnSuperClassOfClassInterface(), addFixitForObjCARCConversion(), clang::ASTRecordWriter::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(), ConvertDeducedTemplateArguments(), 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::EmitCXXForRangeStmt(), clang::CodeGen::CodeGenFunction::EmitDoStmt(), clang::CodeGen::CodeGenFunction::EmitForStmt(), clang::CodeGen::CodeGenFunction::EmitObjCForCollectionStmt(), clang::CodeGen::CodeGenFunction::EmitOMPInnerLoop(), clang::Preprocessor::EnterAnnotationToken(), clang::BuiltinTypeLoc::expandBuiltinRange(), extendLeft(), extendRight(), clang::Declarator::ExtendWithDeclSpec(), clang::ASTReader::findPreprocessedEntitiesInRange(), GCRewriteFinalize(), clang::CodeGen::CodeGenFunction::GenerateCode(), clang::Lexer::getAsCharRange(), clang::Decl::getBodyRBrace(), clang::CharSourceRange::getEnd(), clang::CXXScopeSpec::getEndLoc(), clang::TypeLoc::getEndLoc(), clang::NestedNameSpecifierLoc::getEndLoc(), clang::CXXNewExpr::getEndLoc(), clang::SourceManager::getExpansionRange(), clang::DeclaratorChunk::getFunction(), 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::OffsetOfNode::getLocEnd(), clang::CXXNoexceptExpr::getLocEnd(), clang::VariableArrayType::getRBracketLoc(), clang::DependentSizedArrayType::getRBracketLoc(), clang::FunctionDecl::getReturnTypeSourceRange(), clang::Rewriter::getRewrittenText(), clang::NestedNameSpecifierLoc::getSourceRange(), clang::ParmVarDecl::getSourceRange(), clang::ClassTemplateSpecializationDecl::getSourceRange(), clang::TagDecl::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::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(), warnBracedScalarInit(), 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 214 of file SourceLocation.h.

bool clang::SourceRange::operator== ( const SourceRange X) const
inline

Definition at line 210 of file SourceLocation.h.

void clang::SourceRange::setBegin ( SourceLocation  b)
inline
void clang::SourceRange::setEnd ( SourceLocation  e)
inline

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