clang
6.0.0
|
A trivial tuple used to represent a source range. More...
#include "clang/Basic/SourceLocation.h"
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 |
A trivial tuple used to represent a source range.
Definition at line 195 of file SourceLocation.h.
|
default |
|
inline |
Definition at line 201 of file SourceLocation.h.
|
inline |
Definition at line 202 of file SourceLocation.h.
|
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().
|
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().
|
inline |
Definition at line 211 of file SourceLocation.h.
Referenced by clang::Sema::CheckARCMethodDecl(), clang::Sema::CheckMessageArgumentTypes(), clang::arcmt::CapturedDiagList::clearDiagnostic(), extendLeft(), extendRight(), clang::ASTReader::findPreprocessedEntitiesInRange(), clang::PreprocessingRecord::getPreprocessedEntitiesInRange(), clang::FunctionDecl::getReturnTypeSourceRange(), clang::arcmt::CapturedDiagList::hasDiagnostic(), clang::PreprocessingRecord::isEntityInFileID(), clang::PPConditionalDirectiveRecord::rangeIntersectsConditionalDirective(), clang::Rewriter::ReplaceText(), and clang::TreeTransform< Derived >::TransformInitializer().
|
inline |
Definition at line 210 of file SourceLocation.h.
References clang::SourceLocation::isValid().
Referenced by clang::ento::BugReport::addRange(), clang::ento::PathDiagnosticPiece::addRange(), clang::Sema::BuildCXXNew(), clang::Sema::BuildImplicitMemberExpr(), clang::Sema::CheckConversionDeclarator(), clang::Sema::CheckObjCConversion(), clang::CXXNewExpr::CXXNewExpr(), diagnoseObjCARCConversion(), clang::tooling::findSelectedASTNodes(), clang::ParmVarDecl::getSourceRange(), clang::CXXScopeSpec::isEmpty(), clang::PreprocessingRecord::isEntityInFileID(), clang::CXXNewExpr::isParenTypeId(), clang::CharSourceRange::isValid(), clang::ento::PathDiagnosticLocation::PathDiagnosticLocation(), clang::ento::mpi::MPIBugReporter::reportDoubleNonblocking(), clang::ento::mpi::MPIBugReporter::reportUnmatchedWait(), and clang::CXXScopeSpec::SetInvalid().
|
inline |
Definition at line 217 of file SourceLocation.h.
|
inline |
Definition at line 213 of file SourceLocation.h.
|
inline |
Definition at line 207 of file SourceLocation.h.
Referenced by clang::Sema::ActOnPackExpansion(), addContextSensitiveTypeNullability(), clang::InitializationSequence::Diagnose(), diagnoseDynamicExceptionSpecification(), diagnoseInstanceReference(), clang::BuiltinTypeLoc::expandBuiltinRange(), extendLeft(), extendRight(), clang::Declarator::ExtendWithDeclSpec(), FixDigraph(), clang::CharSourceRange::setBegin(), clang::CXXScopeSpec::setBeginLoc(), clang::TypoCorrection::setCorrectionRange(), clang::CXXScopeSpec::SetInvalid(), clang::Declarator::SetRangeBegin(), clang::DeclSpec::SetRangeStart(), clang::TypeLocReader::VisitArrayTypeLoc(), and clang::TypeLocReader::VisitFunctionTypeLoc().
|
inline |
Definition at line 208 of file SourceLocation.h.
Referenced by addContextSensitiveTypeNullability(), clang::tooling::ExtractionSemicolonPolicy::compute(), clang::CXXNewExpr::CXXNewExpr(), diagnoseDynamicExceptionSpecification(), clang::BuiltinTypeLoc::expandBuiltinRange(), extendLeft(), extendRight(), clang::Declarator::ExtendWithDeclSpec(), FixDigraph(), clang::AttributedTypeLoc::getLocalSourceRange(), clang::DependentAddressSpaceTypeLoc::getLocalSourceRange(), clang::comments::HTMLStartTagComment::setAttrs(), clang::CharSourceRange::setEnd(), clang::CXXScopeSpec::setEndLoc(), clang::comments::HTMLStartTagComment::setGreaterLoc(), clang::CXXScopeSpec::SetInvalid(), clang::DeclSpec::SetRangeEnd(), clang::Declarator::SetRangeEnd(), clang::TypeLocReader::VisitArrayTypeLoc(), and clang::TypeLocReader::VisitFunctionTypeLoc().