clang 20.0.0git
|
Represents a C++ nested-name-specifier or a global scope specifier. More...
#include "clang/Sema/DeclSpec.h"
Public Member Functions | |
SourceRange | getRange () const |
void | setRange (SourceRange R) |
void | setBeginLoc (SourceLocation Loc) |
void | setEndLoc (SourceLocation Loc) |
SourceLocation | getBeginLoc () const |
SourceLocation | getEndLoc () const |
void | setTemplateParamLists (ArrayRef< TemplateParameterList * > L) |
ArrayRef< TemplateParameterList * > | getTemplateParamLists () const |
NestedNameSpecifier * | getScopeRep () const |
Retrieve the representation of the nested-name-specifier. | |
void | Extend (ASTContext &Context, SourceLocation TemplateKWLoc, TypeLoc TL, SourceLocation ColonColonLoc) |
Extend the current nested-name-specifier by another nested-name-specifier component of the form 'type::'. | |
void | Extend (ASTContext &Context, IdentifierInfo *Identifier, SourceLocation IdentifierLoc, SourceLocation ColonColonLoc) |
Extend the current nested-name-specifier by another nested-name-specifier component of the form 'identifier::'. | |
void | Extend (ASTContext &Context, NamespaceDecl *Namespace, SourceLocation NamespaceLoc, SourceLocation ColonColonLoc) |
Extend the current nested-name-specifier by another nested-name-specifier component of the form 'namespace::'. | |
void | Extend (ASTContext &Context, NamespaceAliasDecl *Alias, SourceLocation AliasLoc, SourceLocation ColonColonLoc) |
Extend the current nested-name-specifier by another nested-name-specifier component of the form 'namespace-alias::'. | |
void | MakeGlobal (ASTContext &Context, SourceLocation ColonColonLoc) |
Turn this (empty) nested-name-specifier into the global nested-name-specifier '::'. | |
void | MakeSuper (ASTContext &Context, CXXRecordDecl *RD, SourceLocation SuperLoc, SourceLocation ColonColonLoc) |
Turns this (empty) nested-name-specifier into '__super' nested-name-specifier. | |
void | MakeTrivial (ASTContext &Context, NestedNameSpecifier *Qualifier, SourceRange R) |
Make a new nested-name-specifier from incomplete source-location information. | |
void | Adopt (NestedNameSpecifierLoc Other) |
Adopt an existing nested-name-specifier (with source-range information). | |
NestedNameSpecifierLoc | getWithLocInContext (ASTContext &Context) const |
Retrieve a nested-name-specifier with location information, copied into the given AST context. | |
SourceLocation | getLastQualifierNameLoc () const |
Retrieve the location of the name in the last qualifier in this nested name specifier. | |
bool | isEmpty () const |
No scope specifier. | |
bool | isNotEmpty () const |
A scope specifier is present, but may be valid or invalid. | |
bool | isInvalid () const |
An error occurred during parsing of the scope specifier. | |
bool | isValid () const |
A scope specifier is present, and it refers to a real scope. | |
void | SetInvalid (SourceRange R) |
Indicate that this nested-name-specifier is invalid. | |
bool | isSet () const |
Deprecated. | |
void | clear () |
char * | location_data () const |
Retrieve the data associated with the source-location information. | |
unsigned | location_size () const |
Retrieve the size of the data associated with source-location information. | |
Represents a C++ nested-name-specifier or a global scope specifier.
These can be in 3 states: 1) Not present, identified by isEmpty() 2) Present, identified by isNotEmpty() 2.a) Valid, identified by isValid() 2.b) Invalid, identified by isInvalid().
isSet() is deprecated because it mostly corresponded to "valid" but was often used as if it meant "present".
The actual scope is described by getScopeRep().
If the kind of getScopeRep() is TypeSpec then TemplateParamLists may be empty or contain the template parameter lists attached to the current declaration. Consider the following example: template <class T> void SomeType<T>::some_method() {} If CXXScopeSpec refers to SomeType<T> then TemplateParamLists will contain a single element referring to template <class T>.
Definition at line 74 of file DeclSpec.h.
void CXXScopeSpec::Adopt | ( | NestedNameSpecifierLoc | Other | ) |
Adopt an existing nested-name-specifier (with source-range information).
Definition at line 132 of file DeclSpec.cpp.
References clang::NestedNameSpecifierLocBuilder::Adopt(), clang::NestedNameSpecifierLocBuilder::Clear(), clang::NestedNameSpecifierLocBuilder::getSourceRange(), and clang::Other.
Referenced by clang::Sema::ActOnNameClassifiedAsOverloadSet(), clang::Sema::ActOnTemplateTypeArgument(), BuildRecoveryCallExpr(), clang::Sema::CheckPlaceholderExpr(), clang::Sema::CheckTemplateArgument(), clang::Sema::CheckTemplateTypeArgument(), clang::Sema::CheckTypenameType(), clang::Sema::diagnoseExprIntendedAsTemplateName(), formImmediatelyDeclaredConstraint(), clang::Sema::getDestructorName(), clang::TreeTransform< Derived >::RebuildConceptSpecializationExpr(), clang::TreeTransform< Derived >::RebuildCXXDependentScopeMemberExpr(), clang::TreeTransform< Derived >::RebuildDeclRefExpr(), clang::TreeTransform< Derived >::RebuildDependentNameType(), clang::TreeTransform< Derived >::RebuildDependentScopeDeclRefExpr(), clang::TreeTransform< Derived >::RebuildDependentTemplateSpecializationType(), clang::TreeTransform< Derived >::RebuildMemberExpr(), clang::Sema::RebuildNestedNameSpecifierInCurrentInstantiation(), clang::TreeTransform< Derived >::RebuildUnresolvedMemberExpr(), clang::Sema::RestoreNestedNameSpecifierAnnotation(), clang::Sema::SubstTemplateName(), clang::TreeTransform< Derived >::TransformNestedNameSpecifierLoc(), clang::transformOMPMappableExprListClause(), clang::TreeTransform< Derived >::TransformTemplateArgument(), clang::TemplateDeclInstantiator::VisitCXXMethodDecl(), and clang::TemplateDeclInstantiator::VisitFunctionDecl().
|
inline |
Definition at line 230 of file DeclSpec.h.
References Range.
Referenced by clang::Sema::ActOnCXXMemberDeclarator(), clang::Sema::BuildCXXNestedNameSpecifier(), clang::Declarator::clear(), clang::Sema::diagnoseQualifiedDeclaration(), LookupMemberExpr(), and clang::Parser::ParseUnqualifiedId().
void CXXScopeSpec::Extend | ( | ASTContext & | Context, |
IdentifierInfo * | Identifier, | ||
SourceLocation | IdentifierLoc, | ||
SourceLocation | ColonColonLoc | ||
) |
Extend the current nested-name-specifier by another nested-name-specifier component of the form 'identifier::'.
Context | The AST context in which this nested-name-specifier resides. |
Identifier | The identifier. |
IdentifierLoc | The location of the identifier. |
ColonColonLoc | The location of the trailing '::'. |
Definition at line 65 of file DeclSpec.cpp.
References clang::NestedNameSpecifierLocBuilder::Extend(), clang::SourceRange::getBegin(), clang::NestedNameSpecifierLocBuilder::getSourceRange(), Identifier, clang::SourceLocation::isInvalid(), clang::SourceRange::setBegin(), and clang::SourceRange::setEnd().
void CXXScopeSpec::Extend | ( | ASTContext & | Context, |
NamespaceAliasDecl * | Alias, | ||
SourceLocation | AliasLoc, | ||
SourceLocation | ColonColonLoc | ||
) |
Extend the current nested-name-specifier by another nested-name-specifier component of the form 'namespace-alias::'.
Context | The AST context in which this nested-name-specifier resides. |
Alias | The namespace alias. |
AliasLoc | The location of the namespace alias name. |
ColonColonLoc | The location of the trailing '::'. |
Definition at line 91 of file DeclSpec.cpp.
References clang::NestedNameSpecifierLocBuilder::Extend(), clang::SourceRange::getBegin(), clang::NestedNameSpecifierLocBuilder::getSourceRange(), clang::SourceLocation::isInvalid(), clang::SourceRange::setBegin(), and clang::SourceRange::setEnd().
void CXXScopeSpec::Extend | ( | ASTContext & | Context, |
NamespaceDecl * | Namespace, | ||
SourceLocation | NamespaceLoc, | ||
SourceLocation | ColonColonLoc | ||
) |
Extend the current nested-name-specifier by another nested-name-specifier component of the form 'namespace::'.
Context | The AST context in which this nested-name-specifier resides. |
Namespace | The namespace. |
NamespaceLoc | The location of the namespace name. |
ColonColonLoc | The location of the trailing '::'. |
Definition at line 78 of file DeclSpec.cpp.
References clang::NestedNameSpecifierLocBuilder::Extend(), clang::SourceRange::getBegin(), clang::NestedNameSpecifierLocBuilder::getSourceRange(), clang::SourceLocation::isInvalid(), clang::SourceRange::setBegin(), and clang::SourceRange::setEnd().
void CXXScopeSpec::Extend | ( | ASTContext & | Context, |
SourceLocation | TemplateKWLoc, | ||
TypeLoc | TL, | ||
SourceLocation | ColonColonLoc | ||
) |
Extend the current nested-name-specifier by another nested-name-specifier component of the form 'type::'.
Context | The AST context in which this nested-name-specifier resides. |
TemplateKWLoc | The location of the 'template' keyword, if present. |
TL | The TypeLoc that describes the type preceding the '::'. |
ColonColonLoc | The location of the trailing '::'. |
Definition at line 54 of file DeclSpec.cpp.
References clang::NestedNameSpecifierLocBuilder::Extend(), clang::SourceRange::getBegin(), clang::TypeLoc::getBeginLoc(), clang::NestedNameSpecifierLocBuilder::getSourceRange(), clang::SourceLocation::isInvalid(), clang::SourceRange::setBegin(), and clang::SourceRange::setEnd().
Referenced by clang::Sema::ActOnCXXNestedNameSpecifier(), clang::Sema::ActOnCXXNestedNameSpecifierDecltype(), clang::Sema::ActOnCXXNestedNameSpecifierIndexedPack(), clang::Sema::BuildCXXNestedNameSpecifier(), clang::TreeTransform< Derived >::RebuildCXXPseudoDestructorExpr(), and clang::TreeTransform< Derived >::TransformNestedNameSpecifierLoc().
|
inline |
Definition at line 84 of file DeclSpec.h.
References Range.
Referenced by actOnOMPReductionKindClause(), clang::Sema::ActOnPackExpansion(), clang::Sema::ActOnTag(), clang::Sema::ActOnTemplatedFriendTag(), clang::Sema::ActOnTemplateIdType(), clang::Sema::ActOnUsingDeclaration(), clang::Sema::ActOnUsingEnumDeclaration(), clang::Sema::BuildDependentDeclRefExpr(), clang::Sema::BuildQualifiedDeclarationNameExpr(), clang::Sema::BuildUsingDeclaration(), clang::Sema::CheckConceptTemplateId(), clang::Sema::CheckTypenameType(), clang::Sema::CheckUsingDeclQualifier(), GetFullTypeForDeclarator(), clang::DeclaratorChunk::getMemberPointer(), clang::TypoCorrection::setCorrectionRange(), and clang::Parser::TryAnnotateTypeOrScopeTokenAfterScopeSpec().
|
inline |
Definition at line 85 of file DeclSpec.h.
References Range.
Referenced by clang::Sema::getDestructorName().
SourceLocation CXXScopeSpec::getLastQualifierNameLoc | ( | ) | const |
Retrieve the location of the name in the last qualifier in this nested name specifier.
For example, the location of bar
in
/// \::foo::bar<0>:: /// ^~~ ///
Definition at line 145 of file DeclSpec.cpp.
References clang::NestedNameSpecifierLoc::getLocalBeginLoc(), clang::NestedNameSpecifierLocBuilder::getRepresentation(), and clang::NestedNameSpecifierLocBuilder::getTemporary().
Referenced by clang::Sema::computeDeclContext(), clang::Sema::getConstructorName(), and clang::Sema::RequireCompleteDeclContext().
|
inline |
Definition at line 80 of file DeclSpec.h.
References Range.
Referenced by clang::Sema::ActOnCXXMemberDeclarator(), clang::Sema::ActOnCXXNestedNameSpecifier(), clang::Sema::ActOnDependentTag(), clang::Sema::ActOnExplicitInstantiation(), clang::Sema::ActOnFriendFunctionDecl(), clang::Sema::ActOnNamespaceAliasDef(), clang::Sema::ActOnTag(), clang::Sema::ActOnTemplatedFriendTag(), clang::Sema::ActOnTemplateName(), clang::Sema::ActOnUsingDeclaration(), clang::Sema::ActOnUsingDirective(), clang::Sema::BuildCXXNestedNameSpecifier(), clang::Sema::BuildDeclarationNameExpr(), clang::Sema::BuildImplicitMemberExpr(), clang::Sema::BuildMemberReferenceExpr(), clang::Sema::BuildQualifiedDeclarationNameExpr(), clang::Sema::BuildQualifiedTemplateIdExpr(), clang::Sema::BuildUsingDeclaration(), clang::Sema::CheckClassTemplate(), clang::Sema::CheckUsingDeclQualifier(), clang::Sema::CheckUsingDeclRedeclaration(), clang::Sema::ClassifyName(), clang::Sema::DiagnoseEmptyLookup(), clang::Sema::diagnoseExprIntendedAsTemplateName(), diagnoseInstanceReference(), clang::Sema::diagnoseQualifiedDeclaration(), DiagnoseQualifiedMemberReference(), clang::Sema::DiagnoseUnexpandedParameterPack(), clang::Sema::DiagnoseUnknownTypeName(), emitEmptyLookupTypoDiagnostic(), clang::Sema::getConstructorName(), clang::Sema::getDestructorName(), GetFullTypeForDeclarator(), clang::Sema::getTypeName(), LookupMemberExpr(), clang::Sema::LookupParsedName(), clang::Sema::LookupTemplateName(), clang::Sema::RebuildNestedNameSpecifierInCurrentInstantiation(), clang::Sema::RequireCompleteDeclContext(), clang::Sema::RequireCompleteEnumDecl(), clang::TreeTransform< Derived >::TransformNestedNameSpecifierLoc(), clang::Parser::TryAnnotateTypeOrScopeToken(), and TryNamespaceTypoCorrection().
|
inline |
Retrieve the representation of the nested-name-specifier.
Definition at line 95 of file DeclSpec.h.
Referenced by clang::Sema::ActOnCXXNestedNameSpecifier(), clang::Sema::ActOnDependentTag(), clang::Sema::ActOnFriendFunctionDecl(), clang::Sema::ActOnIdExpression(), clang::Sema::ActOnMemberAccessExpr(), clang::Sema::ActOnTagTemplateIdType(), clang::Sema::ActOnTemplatedFriendTag(), clang::Sema::ActOnTemplateIdType(), clang::Sema::ActOnTemplateName(), clang::Sema::ActOnTypenameType(), clang::Sema::ActOnUsingDeclaration(), clang::Sema::ActOnUsingDirective(), clang::Sema::BuildFieldReferenceExpr(), clang::Sema::BuildMemberReferenceExpr(), clang::Sema::BuildQualifiedDeclarationNameExpr(), clang::Sema::BuildUsingDeclaration(), clang::Sema::CheckClassTemplate(), clang::Sema::checkLiteralOperatorId(), clang::Sema::CheckTemplateTypeArgument(), clang::Sema::CheckUsingDeclQualifier(), clang::Sema::CheckUsingDeclRedeclaration(), clang::Sema::ClassifyName(), clang::SemaCodeCompletion::CodeCompleteQualifiedId(), clang::Sema::computeDeclContext(), clang::Sema::containsUnexpandedParameterPacks(), clang::Sema::diagnoseMissingTemplateArguments(), clang::Sema::diagnoseQualifiedDeclaration(), clang::Sema::DiagnoseUnexpandedParameterPack(), clang::Sema::DiagnoseUnknownTemplateName(), clang::Sema::DiagnoseUnknownTypeName(), clang::Sema::getConstructorName(), clang::Sema::getDestructorName(), clang::Sema::getElaboratedType(), GetFullTypeForDeclarator(), clang::Sema::getInheritingConstructorName(), getRangeOfTypeInNestedNameSpecifier(), clang::Sema::getTypeName(), clang::Sema::isDeductionGuideName(), clang::Sema::isDependentScopeSpecifier(), isEmpty(), isInvalid(), clang::Sema::isMicrosoftMissingTypename(), isSet(), clang::Sema::isTemplateName(), isValid(), LookupMemberExpr(), clang::Sema::LookupParsedName(), clang::Sema::LookupQualifiedName(), clang::Sema::MatchTemplateParametersToScopeSpecifier(), clang::TreeTransform< Derived >::RebuildTemplateName(), clang::Sema::SaveNestedNameSpecifierAnnotation(), ScopeSpecifierHasTemplateId(), clang::Sema::ShouldEnterDeclaratorScope(), clang::TreeTransform< Derived >::TransformNestedNameSpecifierLoc(), clang::TreeTransform< Derived >::TransformTemplateName(), and clang::Sema::tryLookupCtorInitMemberDecl().
|
inline |
Definition at line 90 of file DeclSpec.h.
Referenced by clang::Sema::computeDeclContext().
NestedNameSpecifierLoc CXXScopeSpec::getWithLocInContext | ( | ASTContext & | Context | ) | const |
Retrieve a nested-name-specifier with location information, copied into the given AST context.
Context | The context into which this nested-name-specifier will be copied. |
Definition at line 152 of file DeclSpec.cpp.
References clang::NestedNameSpecifierLocBuilder::getRepresentation(), and clang::NestedNameSpecifierLocBuilder::getWithLocInContext().
Referenced by clang::Sema::ActOnCXXNestedNameSpecifier(), clang::Sema::ActOnDependentMemberExpr(), clang::Sema::ActOnDependentTag(), clang::Sema::ActOnMSDependentExistsStmt(), clang::Sema::ActOnNamespaceAliasDef(), clang::SemaOpenMP::ActOnOpenMPFromClause(), clang::SemaOpenMP::ActOnOpenMPInReductionClause(), clang::SemaOpenMP::ActOnOpenMPMapClause(), clang::SemaOpenMP::ActOnOpenMPReductionClause(), clang::SemaOpenMP::ActOnOpenMPTaskReductionClause(), clang::SemaOpenMP::ActOnOpenMPToClause(), clang::Sema::ActOnTag(), clang::Sema::ActOnTagTemplateIdType(), clang::Sema::ActOnTemplatedFriendTag(), clang::Sema::ActOnTemplateIdType(), clang::Sema::ActOnTypenameType(), clang::Sema::ActOnTypeRequirement(), clang::Sema::ActOnUsingDirective(), clang::Sema::BuildDeclarationNameExpr(), buildDeclareReductionRef(), clang::Sema::BuildDeclRefExpr(), clang::Sema::BuildDependentDeclRefExpr(), clang::Sema::BuildFieldReferenceExpr(), clang::Sema::BuildMemberReferenceExpr(), clang::Sema::BuildMemInitializer(), BuildMSPropertyRefExpr(), buildNamedType(), clang::Sema::BuildPossibleImplicitMemberExpr(), clang::Sema::BuildPseudoDestructorExpr(), clang::Sema::BuildQualifiedDeclarationNameExpr(), clang::Sema::BuildTemplateIdExpr(), clang::Sema::BuildTypeConstraint(), buildUserDefinedMapperRef(), clang::Sema::BuildUsingDeclaration(), clang::Sema::CheckConceptTemplateId(), clang::Sema::CheckTemplateArgument(), clang::Sema::CheckTemplateTypeArgument(), clang::Sema::ClassifyName(), clang::Sema::getDestructorName(), clang::Sema::getTypeName(), clang::Sema::RebuildNestedNameSpecifierInCurrentInstantiation(), recoverFromMSUnqualifiedLookup(), recoverFromTypeInKnownDependentBase(), SetNestedNameSpecifier(), clang::TreeTransform< Derived >::TransformDependentTemplateSpecializationType(), clang::TreeTransform< Derived >::TransformNestedNameSpecifierLoc(), clang::transformOMPMappableExprListClause(), and translateTemplateArgument().
|
inline |
No scope specifier.
Definition at line 208 of file DeclSpec.h.
References getScopeRep(), and Range.
Referenced by clang::Sema::ActOnDependentIdExpression(), clang::Sema::ActOnIdExpression(), clang::Sema::ActOnNameClassifiedAsNonType(), clang::Sema::ActOnTag(), clang::Sema::ActOnTemplatedFriendTag(), clang::Sema::ActOnUsingDeclaration(), clang::Sema::BuildMemberReferenceExpr(), buildNamedType(), clang::Sema::CheckClassTemplate(), clang::Sema::ClassifyName(), clang::SemaCodeCompletion::CodeCompleteQualifiedId(), clang::Sema::DiagnoseEmptyLookup(), diagnoseInstanceReference(), DiagnoseTwoPhaseLookup(), emitEmptyLookupTypoDiagnostic(), clang::Sema::getTypeName(), isNotEmpty(), clang::Sema::isPotentialImplicitMemberAccess(), LookupMemberExpr(), clang::Sema::LookupParsedName(), clang::Sema::LookupTemplateName(), ParseReductionId(), clang::Parser::ParseUnqualifiedId(), clang::Sema::SaveNestedNameSpecifierAnnotation(), clang::TypoCorrection::setCorrectionRange(), clang::Parser::TryAnnotateCXXScopeToken(), clang::Parser::TryAnnotateTypeOrScopeToken(), and clang::Parser::TryAnnotateTypeOrScopeTokenAfterScopeSpec().
|
inline |
An error occurred during parsing of the scope specifier.
Definition at line 213 of file DeclSpec.h.
References getScopeRep(), and Range.
Referenced by clang::Sema::ActOnCXXEnterDeclaratorScope(), clang::Sema::ActOnCXXExitDeclaratorScope(), clang::Sema::ActOnCXXMemberDeclarator(), clang::Sema::ActOnCXXNestedNameSpecifier(), clang::Sema::ActOnCXXNestedNameSpecifierDecltype(), clang::Sema::ActOnCXXNestedNameSpecifierIndexedPack(), clang::Sema::ActOnFriendFunctionDecl(), clang::Sema::ActOnIdExpression(), clang::Sema::ActOnTag(), clang::Sema::ActOnTagTemplateIdType(), clang::Sema::ActOnTemplateIdType(), clang::Sema::ActOnTemplateName(), clang::Sema::ActOnTypenameType(), clang::Sema::ActOnUsingDirective(), clang::Sema::ActOnUsingEnumDeclaration(), buildDeclareReductionRef(), clang::Sema::BuildMemberReferenceExpr(), clang::Sema::BuildQualifiedDeclarationNameExpr(), clang::Sema::BuildQualifiedTemplateIdExpr(), buildUserDefinedMapperRef(), clang::Sema::BuildUsingDeclaration(), clang::Sema::CheckClassTemplate(), clang::Sema::ClassifyName(), clang::SemaCodeCompletion::CodeCompleteQualifiedId(), clang::Sema::computeDeclContext(), clang::Sema::DiagnoseUnknownTypeName(), clang::Sema::getCurrentClass(), clang::Sema::getDestructorName(), GetFullTypeForDeclarator(), clang::Sema::isCurrentClassNameTypo(), clang::Sema::isDependentScopeSpecifier(), clang::Sema::IsInvalidUnlessNestedName(), clang::Sema::isTemplateName(), LookupMemberExpr(), clang::Sema::LookupParsedName(), clang::Sema::LookupTemplateName(), clang::Sema::RebuildNestedNameSpecifierInCurrentInstantiation(), and clang::Sema::SaveNestedNameSpecifierAnnotation().
|
inline |
A scope specifier is present, but may be valid or invalid.
Definition at line 210 of file DeclSpec.h.
References isEmpty().
Referenced by clang::Sema::ActOnFriendFunctionDecl(), clang::Sema::ActOnTag(), clang::Sema::ActOnTemplatedFriendTag(), clang::Sema::ActOnTemplateName(), clang::Sema::CheckClassTemplate(), clang::Sema::getConstructorName(), clang::Sema::getCurrentClass(), clang::Sema::getTypeName(), clang::Sema::LookupParsedName(), clang::Sema::LookupTemplateName(), clang::Parser::ParseUnqualifiedId(), clang::Parser::TryAnnotateTypeOrScopeTokenAfterScopeSpec(), and clang::Sema::UseArgumentDependentLookup().
|
inline |
Deprecated.
Some call sites intend isNotEmpty() while others intend isValid().
Definition at line 228 of file DeclSpec.h.
References getScopeRep().
Referenced by clang::Sema::ActOnClassTemplateSpecialization(), clang::Sema::ActOnCXXEnterDeclaratorScope(), clang::Sema::ActOnCXXExitDeclaratorScope(), clang::Sema::ActOnCXXMemberDeclarator(), clang::Sema::ActOnExplicitInstantiation(), clang::Sema::ActOnFriendFunctionDecl(), clang::Sema::ActOnIdExpression(), clang::Sema::ActOnMemberAccessExpr(), clang::Sema::ActOnPseudoDestructorExpr(), clang::Sema::ActOnTag(), clang::Sema::ActOnTemplateIdType(), clang::Sema::ActOnUsingDirective(), clang::Sema::BuildCXXNestedNameSpecifier(), buildDeclareReductionRef(), clang::Sema::BuildMemberReferenceExpr(), clang::Sema::BuildMemInitializer(), clang::Sema::BuildTypeConstraint(), buildUserDefinedMapperRef(), clang::Sema::CheckClassTemplate(), clang::Sema::CheckConceptTemplateId(), clang::Sema::ClassifyName(), clang::Sema::computeDeclContext(), diagnoseInstanceReference(), clang::Sema::DiagnoseUnknownTemplateName(), clang::Sema::DiagnoseUnknownTypeName(), clang::Sema::getDestructorName(), hasUserDefinedMapper(), clang::Sema::isCurrentClassNameTypo(), clang::Sema::isDependentScopeSpecifier(), LookupMemberExprInRecord(), clang::Parser::ParseUnqualifiedId(), ScopeSpecifierHasTemplateId(), SetNestedNameSpecifier(), and clang::Sema::ShouldEnterDeclaratorScope().
|
inline |
A scope specifier is present, and it refers to a real scope.
Definition at line 215 of file DeclSpec.h.
References getScopeRep().
Referenced by clang::Sema::ActOnFriendFunctionDecl(), clang::Sema::ActOnIdExpression(), actOnOMPReductionKindClause(), clang::Sema::ActOnPackExpansion(), clang::Sema::BuildDependentDeclRefExpr(), clang::Sema::CheckClassTemplate(), clang::Sema::checkLiteralOperatorId(), clang::SemaCodeCompletion::CodeCompleteQualifiedId(), clang::Sema::diagnoseQualifiedDeclaration(), clang::Sema::DiagnoseUnknownTypeName(), clang::Sema::getDestructorName(), and clang::Sema::getElaboratedType().
|
inline |
Retrieve the data associated with the source-location information.
Definition at line 236 of file DeclSpec.h.
Referenced by clang::Sema::diagnoseQualifiedDeclaration(), clang::Sema::getDestructorName(), getRangeOfTypeInNestedNameSpecifier(), clang::Sema::SaveNestedNameSpecifierAnnotation(), and clang::TreeTransform< Derived >::TransformNestedNameSpecifierLoc().
|
inline |
Retrieve the size of the data associated with source-location information.
Definition at line 240 of file DeclSpec.h.
Referenced by clang::Sema::SaveNestedNameSpecifierAnnotation(), and clang::TreeTransform< Derived >::TransformNestedNameSpecifierLoc().
void CXXScopeSpec::MakeGlobal | ( | ASTContext & | Context, |
SourceLocation | ColonColonLoc | ||
) |
Turn this (empty) nested-name-specifier into the global nested-name-specifier '::'.
Definition at line 104 of file DeclSpec.cpp.
References clang::NestedNameSpecifierLocBuilder::getSourceRange(), and clang::NestedNameSpecifierLocBuilder::MakeGlobal().
Referenced by clang::Sema::ActOnCXXGlobalScopeSpecifier(), and clang::TreeTransform< Derived >::TransformNestedNameSpecifierLoc().
void CXXScopeSpec::MakeSuper | ( | ASTContext & | Context, |
CXXRecordDecl * | RD, | ||
SourceLocation | SuperLoc, | ||
SourceLocation | ColonColonLoc | ||
) |
Turns this (empty) nested-name-specifier into '__super' nested-name-specifier.
Context | The AST context in which this nested-name-specifier resides. |
RD | The declaration of the class in which nested-name-specifier appeared. |
SuperLoc | The location of the '__super' keyword. name. |
ColonColonLoc | The location of the trailing '::'. |
Definition at line 114 of file DeclSpec.cpp.
References clang::NestedNameSpecifierLocBuilder::getSourceRange(), clang::NestedNameSpecifierLocBuilder::MakeSuper(), clang::SourceRange::setBegin(), and clang::SourceRange::setEnd().
Referenced by clang::Sema::ActOnSuperScopeSpecifier(), and clang::TreeTransform< Derived >::TransformNestedNameSpecifierLoc().
void CXXScopeSpec::MakeTrivial | ( | ASTContext & | Context, |
NestedNameSpecifier * | Qualifier, | ||
SourceRange | R | ||
) |
Make a new nested-name-specifier from incomplete source-location information.
FIXME: This routine should be used very, very rarely, in cases where we need to synthesize a nested-name-specifier. Most code should instead use Adopt()
with a proper NestedNameSpecifierLoc
.
Definition at line 126 of file DeclSpec.cpp.
References clang::NestedNameSpecifierLocBuilder::MakeTrivial().
Referenced by attemptRecovery(), clang::Sema::BuildCXXNestedNameSpecifier(), clang::Sema::BuildExpressionFromDeclTemplateArgument(), buildSingleCopyAssignRecursively(), clang::Sema::DiagnoseUnknownTypeName(), clang::Sema::getTypeName(), recoverFromMSUnqualifiedLookup(), and recoverFromTypeInKnownDependentBase().
|
inline |
Definition at line 82 of file DeclSpec.h.
|
inline |
Definition at line 83 of file DeclSpec.h.
|
inline |
Indicate that this nested-name-specifier is invalid.
Definition at line 218 of file DeclSpec.h.
References clang::SourceRange::getBegin(), clang::SourceRange::getEnd(), clang::SourceRange::isValid(), and Range.
Referenced by clang::Sema::RequireCompleteDeclContext(), clang::Sema::RequireCompleteEnumDecl(), and clang::Sema::RestoreNestedNameSpecifierAnnotation().
|
inline |
Definition at line 81 of file DeclSpec.h.
References Range.
|
inline |
Definition at line 87 of file DeclSpec.h.