clang: clang::NestedNameSpecifierLoc Class Reference (original) (raw)
A C++ nested-name-specifier augmented with source location information. More...
#include "[clang/AST/NestedNameSpecifierBase.h](NestedNameSpecifierBase%5F8h%5Fsource.html)"
| 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. | |
| NamespaceAndPrefixLoc | castAsNamespaceAndPrefix () const |
| For a nested-name-specifier that refers to a namespace, retrieve the namespace and its prefix. | |
| NamespaceAndPrefixLoc | getAsNamespaceAndPrefix () const |
| TypeLoc | castAsTypeLoc () const |
| For a nested-name-specifier that refers to a type, retrieve the type with source-location information. | |
| TypeLoc | getAsTypeLoc () const |
| unsigned | getDataLength () const |
| Determines the data length for the entire nested-name-specifier. |
A C++ nested-name-specifier augmented with source location information.
Definition at line 301 of file NestedNameSpecifierBase.h.
| clang::NestedNameSpecifierLoc::NestedNameSpecifierLoc ( ) | default |
|---|
◆ NestedNameSpecifierLoc() [2/2]
| clang::NestedNameSpecifierLoc::NestedNameSpecifierLoc ( NestedNameSpecifier Qualifier, void * Data ) | inline |
|---|
◆ castAsNamespaceAndPrefix()
◆ castAsTypeLoc()
| TypeLoc clang::NestedNameSpecifierLoc::castAsTypeLoc ( ) const | inline |
|---|
For a nested-name-specifier that refers to a type, retrieve the type with source-location information.
Definition at line 135 of file NestedNameSpecifier.h.
Referenced by clang::ASTRecordWriter::AddNestedNameSpecifierLoc(), getAsTypeLoc(), getRangeOfTypeInNestedNameSpecifier(), clang::ASTImporter::Import(), clang::index::IndexingContext::indexNestedNameSpecifierLoc(), isEnableIf(), clang::TreeTransform< Derived >::TransformNestedNameSpecifierLoc(), clang::RecursiveASTVisitor< Derived >::TraverseNestedNameSpecifierLoc(), and clang::ASTNodeTraverser< Derived, NodeDelegateType >::VisitMemberPointerTypeLoc().
◆ getAsNamespaceAndPrefix()
◆ getAsTypeLoc()
| TypeLoc clang::NestedNameSpecifierLoc::getAsTypeLoc ( ) const | inline |
|---|
◆ getBeginLoc()
Retrieve the location of the beginning of this nested-name-specifier.
Definition at line 141 of file NestedNameSpecifier.cpp.
References clang::First, and NestedNameSpecifierLoc().
Referenced by buildIdExpression(), clang::CXXDependentScopeMemberExpr::getBeginLoc(), clang::DeclRefExpr::getBeginLoc(), clang::MemberExpr::getBeginLoc(), clang::getBeginLocOfNestedIdentifier(), getFunNameText(), clang::AutoTypeLoc::getLocalSourceRange(), clang::DeducedTemplateSpecializationTypeLoc::getLocalSourceRange(), getSourceRange(), clang::UnresolvedUsingValueDecl::getSourceRange(), clang::UsingDecl::getSourceRange(), clang::getVarDeclIdentifierText(), clang::TemplateSpecializationTypeLoc::set(), clang::Sema::SubstNestedNameSpecifierLoc(), and clang::TreeTransform< Derived >::TransformNestedNameSpecifierLoc().
◆ getDataLength()
| unsigned clang::NestedNameSpecifierLoc::getDataLength ( ) const | inline |
|---|
◆ getEndLoc()
| SourceLocation clang::NestedNameSpecifierLoc::getEndLoc ( ) const | inline |
|---|
◆ getLocalBeginLoc()
| SourceLocation clang::NestedNameSpecifierLoc::getLocalBeginLoc ( ) const | inline |
|---|
◆ getLocalEndLoc()
| SourceLocation clang::NestedNameSpecifierLoc::getLocalEndLoc ( ) const | inline |
|---|
◆ getLocalSourceRange()
| SourceRange clang::NestedNameSpecifierLoc::getLocalSourceRange ( ) const | inline |
|---|
Retrieve the source range covering just the last part of this nested-name-specifier, not including the prefix.
Note that this is the source range of this [NestedNameSpecifier](classclang%5F1%5F1NestedNameSpecifier.html "Represents a C++ nested name specifier, such as "::std::vector::".") chunk, and for a type this includes the prefix of that type.
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 199 of file NestedNameSpecifier.h.
References clang::TypeLoc::getBeginLoc(), getDataLength(), clang::NestedNameSpecifier::Global, clang::NestedNameSpecifier::MicrosoftSuper, clang::NestedNameSpecifier::Namespace, clang::NestedNameSpecifier::Null, and clang::NestedNameSpecifier::Type.
Referenced by clang::ASTRecordWriter::AddNestedNameSpecifierLoc(), getEndLoc(), getLocalBeginLoc(), and getLocalEndLoc().
◆ getNestedNameSpecifier()
Retrieve the nested-name-specifier to which this instance refers.
Definition at line 348 of file NestedNameSpecifierBase.h.
Referenced by clang::ASTRecordWriter::AddNestedNameSpecifierLoc(), clang::Sema::CheckTypenameType(), llvm::DenseMapInfo< clang::NestedNameSpecifierLoc >::getHashValue(), clang::DeclRefExpr::getQualifier(), clang::MemberExpr::getQualifier(), clang::UsingEnumDecl::getQualifier(), getRangeOfTypeInNestedNameSpecifier(), clang::ASTImporter::Import(), clang::index::IndexingContext::indexNestedNameSpecifierLoc(), isEnableIf(), clang::TreeTransform< AdjustConstraintDepth >::RebuildDependentNameType(), clang::TreeTransform< AdjustConstraintDepth >::RebuildMemberExpr(), clang::ElaboratedNameTypeLoc< TL, T >::set(), clang::TemplateSpecializationTypeLoc::set(), clang::DeducedTemplateSpecializationTypeLoc::setQualifierLoc(), clang::DependentNameTypeLoc::setQualifierLoc(), clang::MemberPointerTypeLoc::setQualifierLoc(), clang::TagTypeLoc::setQualifierLoc(), clang::TemplateArgumentLoc::TemplateArgumentLoc(), clang::TreeTransform< Derived >::TransformNestedNameSpecifierLoc(), clang::TreeTransform< Derived >::TransformTagType(), clang::TreeTransform< Derived >::TransformTemplateName(), clang::RecursiveASTVisitor< Derived >::TraverseNestedNameSpecifierLoc(), and clang::tooling::RecursiveSymbolVisitor< T >::TraverseNestedNameSpecifierLoc().
◆ getOpaqueData()
| void * clang::NestedNameSpecifierLoc::getOpaqueData ( ) const | inline |
|---|
◆ getSourceRange()
| SourceRange clang::NestedNameSpecifierLoc::getSourceRange ( ) const | inline |
|---|
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 227 of file NestedNameSpecifier.h.
References getBeginLoc(), and getEndLoc().
Referenced by clang::Sema::BuildUsingDeclaration(), clang::Sema::CheckFriendAccess(), clang::NestedNameSpecifierLocBuilder::getSourceRange(), clang::ASTImporter::Import(), clang::TreeTransform< AdjustConstraintDepth >::RebuildDependentNameType(), clang::Sema::ResolveAndFixSingleFunctionTemplateSpecialization(), clang::TreeTransform< Derived >::TransformOverloadExprDecls(), and TraverseNestedNameSpecifierLoc().
◆ hasQualifier()
| bool clang::NestedNameSpecifierLoc::hasQualifier ( ) const | inline |
|---|
◆ operator bool()
| clang::NestedNameSpecifierLoc::operator bool ( ) const | inlineexplicit |
|---|
◆ operator!=
◆ operator==
The documentation for this class was generated from the following files:
- include/clang/AST/NestedNameSpecifierBase.h
- include/clang/AST/NestedNameSpecifier.h
- lib/AST/NestedNameSpecifier.cpp