clang 20.0.0git
|
A C++ nested-name-specifier augmented with source location information. More...
#include "clang/AST/NestedNameSpecifier.h"
Public Member Functions | |
NestedNameSpecifierLoc ()=default | |
Construct an empty nested-name-specifier. | |
NestedNameSpecifierLoc (NestedNameSpecifier *Qualifier, void *Data) | |
Construct a nested-name-specifier with source location information from. | |
operator bool () const | |
Evaluates true when this nested-name-specifier location is non-empty. | |
bool | hasQualifier () const |
Evaluates true when this nested-name-specifier location is non-empty. | |
NestedNameSpecifier * | getNestedNameSpecifier () const |
Retrieve the nested-name-specifier to which this instance refers. | |
void * | getOpaqueData () const |
Retrieve the opaque pointer that refers to source-location data. | |
SourceRange | getSourceRange () const LLVM_READONLY |
Retrieve the source range covering the entirety of this nested-name-specifier. | |
SourceRange | getLocalSourceRange () const |
Retrieve the source range covering just the last part of this nested-name-specifier, not including the prefix. | |
SourceLocation | getBeginLoc () const |
Retrieve the location of the beginning of this nested-name-specifier. | |
SourceLocation | getEndLoc () const |
Retrieve the location of the end of this nested-name-specifier. | |
SourceLocation | getLocalBeginLoc () const |
Retrieve the location of the beginning of this component of the nested-name-specifier. | |
SourceLocation | getLocalEndLoc () const |
Retrieve the location of the end of this component of the nested-name-specifier. | |
NestedNameSpecifierLoc | getPrefix () const |
Return the prefix of this nested-name-specifier. | |
TypeLoc | getTypeLoc () const |
For a nested-name-specifier that refers to a type, retrieve the type with source-location information. | |
unsigned | getDataLength () const |
Determines the data length for the entire nested-name-specifier. | |
Friends | |
bool | operator== (NestedNameSpecifierLoc X, NestedNameSpecifierLoc Y) |
bool | operator!= (NestedNameSpecifierLoc X, NestedNameSpecifierLoc Y) |
A C++ nested-name-specifier augmented with source location information.
Definition at line 243 of file NestedNameSpecifier.h.
|
default |
Construct an empty nested-name-specifier.
Referenced by getPrefix().
|
inline |
Construct a nested-name-specifier with source location information from.
Definition at line 261 of file NestedNameSpecifier.h.
References Data.
|
inline |
Retrieve the location of the beginning of this nested-name-specifier.
Definition at line 299 of file NestedNameSpecifier.h.
References clang::SourceRange::getBegin(), and getSourceRange().
Referenced by clang::MSPropertyRefExpr::getBeginLoc(), clang::DeclRefExpr::getBeginLoc(), clang::MemberExpr::getBeginLoc(), clang::DependentScopeDeclRefExpr::getBeginLoc(), clang::CXXDependentScopeMemberExpr::getBeginLoc(), getFunNameText(), clang::AutoTypeLoc::getLocalSourceRange(), clang::UsingDecl::getSourceRange(), clang::UnresolvedUsingValueDecl::getSourceRange(), clang::Sema::SubstNestedNameSpecifierLoc(), and clang::TreeTransform< Derived >::TransformNestedNameSpecifierLoc().
|
inline |
Determines the data length for the entire nested-name-specifier.
Definition at line 340 of file NestedNameSpecifier.h.
References getDataLength().
Referenced by getDataLength(), getLocalSourceRange(), and getTypeLoc().
|
inline |
Retrieve the location of the end of this nested-name-specifier.
Definition at line 305 of file NestedNameSpecifier.h.
References clang::SourceRange::getEnd(), and getSourceRange().
Referenced by clang::TreeTransform< Derived >::TransformNestedNameSpecifierLoc().
|
inline |
Retrieve the location of the beginning of this component of the nested-name-specifier.
Definition at line 311 of file NestedNameSpecifier.h.
References clang::SourceRange::getBegin(), and getLocalSourceRange().
Referenced by clang::CXXScopeSpec::getLastQualifierNameLoc(), clang::ASTImporter::Import(), clang::index::IndexingContext::indexNestedNameSpecifierLoc(), clang::TreeTransform< Derived >::TransformNestedNameSpecifierLoc(), and clang::tooling::RecursiveSymbolVisitor< T >::TraverseNestedNameSpecifierLoc().
|
inline |
Retrieve the location of the end of this component of the nested-name-specifier.
Definition at line 317 of file NestedNameSpecifier.h.
References clang::SourceRange::getEnd(), and getLocalSourceRange().
Referenced by clang::ASTImporter::Import(), clang::TreeTransform< Derived >::TransformNestedNameSpecifierLoc(), and clang::tooling::RecursiveSymbolVisitor< T >::TraverseNestedNameSpecifierLoc().
SourceRange NestedNameSpecifierLoc::getLocalSourceRange | ( | ) | const |
Retrieve the source range covering just the last part of this nested-name-specifier, not including the prefix.
For example, if this instance refers to a nested-name-specifier ::std::vector<int>::
, the returned source range would cover from "vector" to the last '::'.
Definition at line 420 of file NestedNameSpecifier.cpp.
References clang::TypeLoc::getBeginLoc(), getDataLength(), clang::NestedNameSpecifier::Global, clang::NestedNameSpecifier::Identifier, LoadPointer(), LoadSourceLocation(), clang::NestedNameSpecifier::Namespace, clang::NestedNameSpecifier::NamespaceAlias, clang::NestedNameSpecifier::Super, clang::NestedNameSpecifier::TypeSpec, and clang::NestedNameSpecifier::TypeSpecWithTemplate.
Referenced by clang::ASTRecordWriter::AddNestedNameSpecifierLoc(), clang::Sema::diagnoseQualifiedDeclaration(), getLocalBeginLoc(), getLocalEndLoc(), and getSourceRange().
|
inline |
Retrieve the nested-name-specifier to which this instance refers.
Definition at line 274 of file NestedNameSpecifier.h.
Referenced by clang::ASTRecordWriter::AddNestedNameSpecifierLoc(), clang::Sema::CheckTypenameType(), clang::Sema::diagnoseQualifiedDeclaration(), llvm::DenseMapInfo< clang::NestedNameSpecifierLoc >::getHashValue(), clang::TagDecl::getQualifier(), clang::UsingDirectiveDecl::getQualifier(), clang::NamespaceAliasDecl::getQualifier(), clang::UsingDecl::getQualifier(), clang::UsingEnumDecl::getQualifier(), clang::UnresolvedUsingValueDecl::getQualifier(), clang::UnresolvedUsingTypenameDecl::getQualifier(), clang::DeclRefExpr::getQualifier(), clang::MemberExpr::getQualifier(), clang::CXXPseudoDestructorExpr::getQualifier(), clang::OverloadExpr::getQualifier(), clang::DependentScopeDeclRefExpr::getQualifier(), clang::CXXDependentScopeMemberExpr::getQualifier(), getRangeOfTypeInNestedNameSpecifier(), clang::ASTImporter::Import(), clang::index::IndexingContext::indexNestedNameSpecifierLoc(), isEnableIf(), clang::ConceptReference::print(), clang::TreeTransform< Derived >::RebuildDependentNameType(), clang::TreeTransform< Derived >::RebuildDependentTemplateSpecializationType(), clang::TreeTransform< Derived >::RebuildElaboratedType(), clang::TreeTransform< Derived >::RebuildMemberExpr(), clang::ElaboratedTypeLoc::setQualifierLoc(), clang::DependentNameTypeLoc::setQualifierLoc(), clang::DependentTemplateSpecializationTypeLoc::setQualifierLoc(), clang::TemplateArgumentLocInfo::TemplateArgumentLocInfo(), clang::TreeTransform< Derived >::TransformNestedNameSpecifierLoc(), clang::RecursiveASTVisitor< Derived >::TraverseNestedNameSpecifierLoc(), and clang::tooling::RecursiveSymbolVisitor< T >::TraverseNestedNameSpecifierLoc().
|
inline |
Retrieve the opaque pointer that refers to source-location data.
Definition at line 279 of file NestedNameSpecifier.h.
References Data.
Referenced by llvm::DenseMapInfo< clang::NestedNameSpecifierLoc >::getHashValue(), clang::ElaboratedTypeLoc::setQualifierLoc(), clang::DependentNameTypeLoc::setQualifierLoc(), clang::DependentTemplateSpecializationTypeLoc::setQualifierLoc(), clang::TemplateArgumentLocInfo::TemplateArgumentLocInfo(), and clang::TreeTransform< Derived >::TransformNestedNameSpecifierLoc().
|
inline |
Return the prefix of this nested-name-specifier.
For example, if this instance refers to a nested-name-specifier ::std::vector<int>::
, the prefix is ::std:
:. Note that the returned prefix may be empty, if this is the first component of the nested-name-specifier.
Definition at line 327 of file NestedNameSpecifier.h.
References Data, and NestedNameSpecifierLoc().
Referenced by clang::ASTRecordWriter::AddNestedNameSpecifierLoc(), clang::Sema::diagnoseQualifiedDeclaration(), getRangeOfTypeInNestedNameSpecifier(), clang::ASTImporter::Import(), clang::index::IndexingContext::indexNestedNameSpecifierLoc(), and clang::RecursiveASTVisitor< Derived >::TraverseNestedNameSpecifierLoc().
SourceRange NestedNameSpecifierLoc::getSourceRange | ( | ) | const |
Retrieve the source range covering the entirety of this nested-name-specifier.
For example, if this instance refers to a nested-name-specifier ::std::vector<int>::
, the returned source range would cover from the initial '::' to the last '::'.
Definition at line 408 of file NestedNameSpecifier.cpp.
References clang::First, and getLocalSourceRange().
Referenced by clang::Sema::BuildUsingDeclaration(), clang::Sema::CheckFriendAccess(), getBeginLoc(), getEndLoc(), clang::ElaboratedTypeLoc::getLocalSourceRange(), clang::NestedNameSpecifierLocBuilder::getSourceRange(), clang::ASTImporter::Import(), clang::TreeTransform< Derived >::RebuildDependentNameType(), clang::Sema::ResolveAndFixSingleFunctionTemplateSpecialization(), and clang::TreeTransform< Derived >::TransformOverloadExprDecls().
TypeLoc NestedNameSpecifierLoc::getTypeLoc | ( | ) | const |
For a nested-name-specifier that refers to a type, retrieve the type with source-location information.
Definition at line 451 of file NestedNameSpecifier.cpp.
References getDataLength(), LoadPointer(), clang::NestedNameSpecifier::TypeSpec, and clang::NestedNameSpecifier::TypeSpecWithTemplate.
Referenced by clang::ASTRecordWriter::AddNestedNameSpecifierLoc(), clang::Sema::diagnoseQualifiedDeclaration(), getRangeOfTypeInNestedNameSpecifier(), clang::ASTImporter::Import(), clang::index::IndexingContext::indexNestedNameSpecifierLoc(), isEnableIf(), clang::TreeTransform< Derived >::TransformNestedNameSpecifierLoc(), and clang::RecursiveASTVisitor< Derived >::TraverseNestedNameSpecifierLoc().
|
inline |
Evaluates true when this nested-name-specifier location is non-empty.
Definition at line 270 of file NestedNameSpecifier.h.
Referenced by clang::MemberExpr::Create(), clang::CXXPseudoDestructorExpr::hasQualifier(), clang::ElaboratedTypeLoc::setQualifierLoc(), and clang::TemplateDeclInstantiator::VisitFunctionDecl().
|
inlineexplicit |
Evaluates true when this nested-name-specifier location is non-empty.
Definition at line 266 of file NestedNameSpecifier.h.
|
friend |
Definition at line 347 of file NestedNameSpecifier.h.
|
friend |
Definition at line 342 of file NestedNameSpecifier.h.