clang  6.0.0svn
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:
Inheritance graph
[legend]

Public Member Functions

 SourceRange ()=default
 
 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 195 of file SourceLocation.h.

Constructor & Destructor Documentation

◆ SourceRange() [1/3]

clang::SourceRange::SourceRange ( )
default

◆ SourceRange() [2/3]

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

Definition at line 201 of file SourceLocation.h.

◆ SourceRange() [3/3]

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

Definition at line 202 of file SourceLocation.h.

Member Function Documentation

◆ getBegin()

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

Definition at line 204 of file SourceLocation.h.

Referenced by clang::Sema::ActOnBaseSpecifier(), clang::Sema::ActOnComment(), clang::Sema::ActOnMemberAccessExpr(), clang::Sema::ActOnOpenMPDeclareSimdDirective(), clang::Sema::AddCFAuditedAttribute(), clang::ASTContext::addComment(), addConstexprToLambdaDeclSpecifier(), addFixitForObjCARCConversion(), clang::Sema::AddParameterABIAttr(), clang::PreprocessingRecord::addPreprocessedEntity(), clang::ASTWriter::AddSourceRange(), clang::arcmt::ObjCMigrateAction::BeginInvocation(), clang::Sema::BuildArrayType(), clang::Sema::BuildBaseInitializer(), clang::Sema::BuildClassMessage(), clang::Sema::BuildCXXNew(), clang::Sema::BuildDelegatingInitializer(), clang::Sema::BuildImplicitMemberExpr(), clang::Sema::BuildMemberInitializer(), clang::Sema::BuildObjCArrayLiteral(), clang::Sema::BuildObjCDictionaryLiteral(), clang::Sema::BuildPseudoDestructorExpr(), clang::Sema::CheckCastAlign(), clang::Sema::CheckCompatibleReinterpretCast(), clang::Sema::CheckConversionDeclarator(), clang::Sema::CheckExceptionSpecCompatibility(), clang::Sema::CheckFriendTypeDecl(), checkLiteralOperatorTemplateParameterList(), clang::Sema::CheckMessageArgumentTypes(), clang::Sema::checkMSInheritanceAttrOnDefinition(), clang::Sema::CheckObjCConversion(), checkObjCMethodX86VectorTypes(), clang::Sema::CheckSpecifiedExceptionType(), clang::Sema::CheckTemplateArgument(), clang::Sema::checkUnknownAnyCast(), clang::Sema::CheckUsingDeclQualifier(), comparePiece(), clang::tooling::CodeRangeASTSelection::create(), clang::InitializationKind::CreateCast(), clang::InitializationKind::CreateCStyleCast(), clang::InitializationKind::CreateFunctionalCast(), clang::Parser::Diag(), clang::InitializationSequence::Diagnose(), clang::Sema::DiagnoseAlwaysNonNullPointer(), DiagnoseBadFunctionCast(), DiagnoseCallingConvCast(), diagnoseDynamicExceptionSpecification(), diagnoseInstanceReference(), clang::Sema::DiagnoseMultipleMethodInGlobalPool(), DiagnoseNullConversion(), diagnoseObjCARCConversion(), clang::Sema::diagnoseTypo(), clang::Sema::DiagnoseUnexpandedParameterPack(), doRewriteToUTF8StringBoxedExpressionHelper(), clang::CodeGen::CodeGenFunction::EmitOMPInnerLoop(), clang::Preprocessor::EnterAnnotationToken(), clang::BuiltinTypeLoc::expandBuiltinRange(), extendLeft(), extendRight(), clang::Declarator::ExtendWithDeclSpec(), clang::PreprocessingRecord::findMacroDefinition(), clang::ASTReader::findPreprocessedEntitiesInRange(), clang::tooling::findSelectedASTNodes(), clang::CodeGen::CodeGenFunction::GenerateCode(), clang::Lexer::getAsCharRange(), clang::ObjCBoxedExpr::getAtLoc(), clang::CharSourceRange::getBegin(), clang::CXXScopeSpec::getBeginLoc(), clang::TypeLoc::getBeginLoc(), clang::NestedNameSpecifierLoc::getBeginLoc(), GetDeclSpecTypeForDeclarator(), clang::SourceManager::getExpansionRange(), getGenericLambdaTemplateParameterList(), clang::DependentFunctionTemplateSpecializationInfo::getLAngleLoc(), 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::ObjCBoxedExpr::getLocStart(), clang::ObjCArrayLiteral::getLocStart(), clang::comments::Comment::getLocStart(), clang::CXXBaseSpecifier::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(), getMissingDeclaratorIdLoc(), clang::tooling::SymbolOccurrence::getNameRanges(), GetNSSetArgumentIndex(), clang::Rewriter::getRewrittenText(), clang::NestedNameSpecifierLoc::getSourceRange(), clang::diff::SyntaxTree::getSourceRangeOffsets(), clang::CXXNewExpr::getStartLoc(), getStrlenExprArg(), clang::DeclSpec::getTypeSpecWidthLoc(), clang::VerifyDiagnosticConsumer::HandleComment(), clang::html::HighlightRange(), clang::ASTImporter::Import(), clang::tooling::RenameOccurrences::initiate(), clang::PreprocessingRecord::isEntityInFileID(), isPreprocessedEntityIfInFileID(), clang::CodeGen::CodeGenFunction::LexicalScope::LexicalScope(), LookupMemberExpr(), clang::ASTUnit::mapRangeFromPreamble(), clang::ASTUnit::mapRangeToPreamble(), clang::Sema::MaybeSuggestAddingStaticToDecl(), clang::Sema::mergeAlwaysInlineAttr(), clang::Sema::mergeAvailabilityAttr(), clang::Sema::mergeDLLImportAttr(), clang::Sema::mergeInternalLinkageAttr(), clang::Sema::mergeMinSizeAttr(), clang::Sema::mergeMSInheritanceAttr(), clang::Sema::mergeOptimizeNoneAttr(), clang::Sema::mergeUuidAttr(), objectifyExpr(), clang::format::WhitespaceManager::Change::IsBeforeInFile::operator()(), clang::BeforeThanCompare< SourceRange >::operator()(), clang::RawComment::parse(), clang::Parser::ParseTopLevelDecl(), clang::InitializationSequence::Perform(), clang::PseudoDestructorTypeStorage::PseudoDestructorTypeStorage(), clang::PPConditionalDirectiveRecord::rangeIntersectsConditionalDirective(), clang::RawComment::RawComment(), clang::TreeTransform< Derived >::RebuildCXXNoexceptExpr(), clang::Rewriter::RemoveText(), clang::Rewriter::ReplaceText(), clang::Sema::RequireCompleteDeclContext(), 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(), SuggestParentheses(), takeDeclAttributes(), clang::TreeTransform< Derived >::TransformCXXNamedCastExpr(), clang::TreeTransform< Derived >::TransformInitializer(), TryReinterpretCast(), TryStaticDowncast(), TryStaticImplicitCast(), TryStaticMemberPointerUpcast(), and warnBracedScalarInit().

◆ getEnd()

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

Definition at line 205 of file SourceLocation.h.

Referenced by clang::Sema::AddCFAuditedAttribute(), addConstexprToLambdaDeclSpecifier(), addFixitForObjCARCConversion(), clang::ASTRecordWriter::AddNestedNameSpecifierLoc(), clang::ASTWriter::AddSourceRange(), clang::arcmt::ObjCMigrateAction::BeginInvocation(), clang::Sema::BuildBaseInitializer(), clang::Sema::BuildMemberInitializer(), clang::Sema::BuildMemInitializer(), CheckAvailabilitySpecList(), clang::comments::Sema::checkBlockCommandEmptyParagraph(), clang::Sema::CheckPureMethod(), comparePiece(), clang::tooling::ExtractionSemicolonPolicy::compute(), ConvertDeducedTemplateArgument(), clang::tooling::CodeRangeASTSelection::create(), clang::InitializationKind::CreateCast(), clang::InitializationKind::CreateCStyleCast(), clang::InitializationKind::CreateFunctionalCast(), clang::CXXNewExpr::CXXNewExpr(), clang::Parser::Diag(), clang::CodeGen::CodeGenFunction::EmitOMPInnerLoop(), clang::Preprocessor::EnterAnnotationToken(), clang::BuiltinTypeLoc::expandBuiltinRange(), extendLeft(), extendRight(), clang::Declarator::ExtendWithDeclSpec(), clang::ASTReader::findPreprocessedEntitiesInRange(), clang::tooling::findSelectedASTNodes(), 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(), getGenericLambdaTemplateParameterList(), getLengthOnSingleLine(), getLiteralInfo(), clang::NestedNameSpecifierLoc::getLocalEndLoc(), clang::CXXOperatorCallExpr::getLocEnd(), clang::ObjCBoxedExpr::getLocEnd(), clang::ObjCArrayLiteral::getLocEnd(), clang::comments::Comment::getLocEnd(), clang::CXXBaseSpecifier::getLocEnd(), clang::ObjCDictionaryLiteral::getLocEnd(), clang::Decl::getLocEnd(), clang::DeclSpec::getLocEnd(), clang::CXXTypeidExpr::getLocEnd(), clang::CXXUuidofExpr::getLocEnd(), clang::CXXTemporaryObjectExpr::getLocEnd(), clang::Declarator::getLocEnd(), clang::OffsetOfNode::getLocEnd(), clang::CXXNoexceptExpr::getLocEnd(), getMissingDeclaratorIdLoc(), clang::DependentFunctionTemplateSpecializationInfo::getRAngleLoc(), clang::VariableArrayType::getRBracketLoc(), clang::DependentSizedArrayType::getRBracketLoc(), clang::FunctionDecl::getReturnTypeSourceRange(), clang::Rewriter::getRewrittenText(), clang::ParmVarDecl::getSourceRange(), clang::ClassTemplateSpecializationDecl::getSourceRange(), clang::diff::SyntaxTree::getSourceRangeOffsets(), clang::format::FormatToken::getStartOfNonWhitespace(), getStrlenExprArg(), clang::VerifyDiagnosticConsumer::HandleComment(), clang::html::HighlightRange(), clang::ASTImporter::Import(), clang::PreprocessingRecord::isEntityInFileID(), isIdiomaticBraceElisionEntity(), LookupMemberExprInRecord(), clang::ASTUnit::mapRangeFromPreamble(), clang::ASTUnit::mapRangeToPreamble(), clang::InitializationSequence::Perform(), clang::PPConditionalDirectiveRecord::rangeIntersectsConditionalDirective(), clang::RawComment::RawComment(), 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(), SuggestParentheses(), clang::TreeTransform< Derived >::TransformCXXNamedCastExpr(), clang::TreeTransform< Derived >::TransformInitializer(), clang::TemplateDeclInstantiator::VisitFunctionDecl(), warnBracedScalarInit(), and clang::CodeGen::CodeGenFunction::LexicalScope::~LexicalScope().

◆ isInvalid()

bool clang::SourceRange::isInvalid ( ) const
inline

◆ isValid()

bool clang::SourceRange::isValid ( ) const
inline

◆ operator!=()

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

Definition at line 217 of file SourceLocation.h.

◆ operator==()

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

Definition at line 213 of file SourceLocation.h.

◆ setBegin()

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

◆ setEnd()

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

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