Represents a C++ nested name specifier, such as "\::std::vector<int>::". More...
#include "clang/AST/NestedNameSpecifier.h"
Represents a C++ nested name specifier, such as "\::std::vector<int>::".
C++ nested name specifiers are the prefixes to qualified names. For example, "foo::" in "foo::x" is a nested name specifier. Nested name specifiers are made up of a sequence of specifiers, each of which can be a namespace, type, identifier (for dependent names), decltype specifier, or the global specifier ('::'). The last two specifiers can only appear at the start of a nested-namespace-specifier.
Definition at line 50 of file NestedNameSpecifier.h.
◆ SpecifierKindThe kind of specifier that completes this nested name specifier.
Enumerator IdentifierAn identifier, stored as an IdentifierInfo*.
NamespaceA namespace, stored as a NamespaceDecl*.
NamespaceAliasA namespace alias, stored as a NamespaceAliasDecl*.
TypeSpecA type, stored as a Type*.
TypeSpecWithTemplateA type that was preceded by the 'template' keyword, stored as a Type*.
GlobalThe global specifier '::'. There is no stored value.
SuperMicrosoft's '__super' specifier, stored as a CXXRecordDecl* of the class it appeared in.
Definition at line 79 of file NestedNameSpecifier.h.
◆ containsErrors() bool NestedNameSpecifier::containsErrors ( ) const ◆ containsUnexpandedParameterPack() bool NestedNameSpecifier::containsUnexpandedParameterPack ( ) const ◆ Create() [1/5]Builds a specifier that consists of just an identifier.
The nested-name-specifier is assumed to be dependent, but has no prefix because the prefix is implied by something outside of the nested name specifier, e.g., in "x->Base::f", the "x" has a dependent type.
Definition at line 113 of file NestedNameSpecifier.cpp.
◆ Create() [2/5] ◆ Create() [3/5]Builds a specifier combining a prefix and an identifier.
The prefix must be dependent, since nested name specifiers referencing an identifier are only permitted when the identifier cannot be resolved.
Definition at line 56 of file NestedNameSpecifier.cpp.
References isDependent().
Referenced by clang::Sema::ActOnMSVCUnknownTypeName(), clang::Sema::BuildExpressionFromDeclTemplateArgument(), buildSingleCopyAssignRecursively(), clang::Sema::BuildStdInitializerList(), clang::Sema::CheckComparisonCategoryType(), clang::TypeName::createNestedNameSpecifier(), clang::NestedNameSpecifierLocBuilder::Extend(), clang::ASTContext::getCanonicalNestedNameSpecifier(), getRequiredQualification(), clang::ASTImporter::Import(), lookupPromiseType(), clang::serialization::DataStreamBasicReader< Impl >::readNestedNameSpecifier(), recoverFromMSUnqualifiedLookup(), recoverFromTypeInKnownDependentBase(), and synthesizeCurrentNestedNameSpecifier().
◆ Create() [4/5] ◆ Create() [5/5] ◆ dump() [1/4] LLVM_DUMP_METHOD void NestedNameSpecifier::dump ( ) const ◆ dump() [2/4] LLVM_DUMP_METHOD void NestedNameSpecifier::dump ( const LangOptions & LO ) const ◆ dump() [3/4] LLVM_DUMP_METHOD void NestedNameSpecifier::dump ( llvm::raw_ostream & OS ) const ◆ dump() [4/4] LLVM_DUMP_METHOD void NestedNameSpecifier::dump ( llvm::raw_ostream & OS, const LangOptions & LO ) const ◆ getAsIdentifier() IdentifierInfo * clang::NestedNameSpecifier::getAsIdentifier ( ) const inlineRetrieve the identifier stored in this nested name specifier.
Definition at line 176 of file NestedNameSpecifier.h.
References Specifier.
Referenced by clang::ODRHash::AddNestedNameSpecifier(), clang::ASTRecordWriter::AddNestedNameSpecifierLoc(), Create(), clang::Sema::FindFirstQualifierInScope(), clang::ASTContext::getCanonicalNestedNameSpecifier(), GetFullTypeForDeclarator(), clang::Sema::getInheritingConstructorName(), getNestedNameSpecifierIdentifiers(), clang::ASTImporter::Import(), isSameQualifier(), IsStructurallyEquivalent(), print(), clang::TreeTransform< Derived >::TransformNestedNameSpecifierLoc(), and clang::serialization::DataStreamBasicWriter< Impl >::writeNestedNameSpecifier().
◆ getAsNamespace()Retrieve the namespace stored in this nested name specifier.
Definition at line 167 of file NestedNameSpecifier.cpp.
Referenced by clang::ODRHash::AddNestedNameSpecifier(), clang::ASTRecordWriter::AddNestedNameSpecifierLoc(), clang::Sema::computeDeclContext(), clang::ASTContext::getCanonicalNestedNameSpecifier(), getNestedNameSpecifierIdentifiers(), clang::ASTImporter::Import(), clang::index::IndexingContext::indexNestedNameSpecifierLoc(), IsStructurallyEquivalent(), print(), clang::TreeTransform< Derived >::TransformNestedNameSpecifierLoc(), clang::tooling::RecursiveSymbolVisitor< T >::TraverseNestedNameSpecifierLoc(), and clang::serialization::DataStreamBasicWriter< Impl >::writeNestedNameSpecifier().
◆ getAsNamespaceAlias()Retrieve the namespace alias stored in this nested name specifier.
Definition at line 175 of file NestedNameSpecifier.cpp.
Referenced by clang::ODRHash::AddNestedNameSpecifier(), clang::ASTRecordWriter::AddNestedNameSpecifierLoc(), clang::Sema::computeDeclContext(), clang::ASTContext::getCanonicalNestedNameSpecifier(), getNestedNameSpecifierIdentifiers(), clang::ASTImporter::Import(), clang::index::IndexingContext::indexNestedNameSpecifierLoc(), IsStructurallyEquivalent(), print(), clang::TreeTransform< Derived >::TransformNestedNameSpecifierLoc(), and clang::serialization::DataStreamBasicWriter< Impl >::writeNestedNameSpecifier().
◆ getAsRecordDecl()Retrieve the record declaration stored in this nested name specifier.
Definition at line 183 of file NestedNameSpecifier.cpp.
References clang::Type::getAsCXXRecordDecl(), and getAsType().
Referenced by clang::ASTRecordWriter::AddNestedNameSpecifierLoc(), clang::Sema::computeDeclContext(), clang::CXXRecordDecl::FindBaseClass(), clang::CXXRecordDecl::FindVirtualBaseClass(), clang::ConstructorUsingShadowDecl::getNominatedBaseClass(), clang::ASTImporter::Import(), IsStructurallyEquivalent(), print(), clang::TreeTransform< Derived >::TransformNestedNameSpecifierLoc(), and clang::serialization::DataStreamBasicWriter< Impl >::writeNestedNameSpecifier().
◆ getAsType() const Type * clang::NestedNameSpecifier::getAsType ( ) const inlineRetrieve the type stored in this nested name specifier.
Definition at line 196 of file NestedNameSpecifier.h.
References Specifier.
Referenced by clang::TypoCorrectionConsumer::addNamespaces(), clang::ODRHash::AddNestedNameSpecifier(), clang::Sema::CheckInheritingConstructorUsingDecl(), clang::Sema::CheckTypenameType(), clang::SemaCodeCompletion::CodeCompleteQualifiedId(), clang::Sema::computeDeclContext(), Create(), clang::Sema::DiagnoseEmptyLookup(), clang::Sema::diagnoseQualifiedDeclaration(), getAsRecordDecl(), clang::ASTContext::getCanonicalNestedNameSpecifier(), clang::Sema::getCurrentInstantiationOf(), getDependence(), GetFullTypeForDeclarator(), clang::Sema::getInheritingConstructorName(), clang::UnresolvedMemberExpr::getNamingClass(), getNestedNameSpecifierIdentifiers(), clang::ASTImporter::Import(), isEnableIf(), clang::Sema::isMicrosoftMissingTypename(), isSameQualifier(), IsStructurallyEquivalent(), clang::NestedNameSpecifierLocBuilder::MakeTrivial(), MarkUsedTemplateParameters(), clang::Sema::MatchTemplateParametersToScopeSpecifier(), print(), ScopeSpecifierHasTemplateId(), clang::RecursiveASTVisitor< Derived >::TraverseNestedNameSpecifier(), and clang::serialization::DataStreamBasicWriter< Impl >::writeNestedNameSpecifier().
◆ getDependence() NestedNameSpecifierDependence NestedNameSpecifier::getDependence ( ) constDefinition at line 199 of file NestedNameSpecifier.cpp.
References clang::CXXRecordDecl::bases(), getAsType(), getDependence(), getKind(), getPrefix(), Global, Identifier, Namespace, NamespaceAlias, Super, clang::toNestedNameSpecifierDependendence(), TypeSpec, and TypeSpecWithTemplate.
Referenced by containsErrors(), containsUnexpandedParameterPack(), getDependence(), isDependent(), and isInstantiationDependent().
◆ getKind()Determine what kind of nested name specifier is stored.
Definition at line 141 of file NestedNameSpecifier.cpp.
References Global, Identifier, Namespace, NamespaceAlias, Super, TypeSpec, and TypeSpecWithTemplate.
Referenced by clang::ODRHash::AddNestedNameSpecifier(), clang::ASTRecordWriter::AddNestedNameSpecifierLoc(), clang::Sema::checkLiteralOperatorId(), clang::Sema::computeDeclContext(), clang::Sema::diagnoseQualifiedDeclaration(), clang::TextNodeDumper::dumpNestedNameSpecifier(), clang::Sema::FindFirstQualifierInScope(), clang::ASTContext::getCanonicalNestedNameSpecifier(), getDependence(), GetFullTypeForDeclarator(), clang::Sema::getInheritingConstructorName(), getNestedNameSpecifierIdentifiers(), clang::ASTImporter::Import(), clang::index::IndexingContext::indexNestedNameSpecifierLoc(), isFullyQualified(), clang::Sema::isMicrosoftMissingTypename(), isSameQualifier(), IsStructurallyEquivalent(), clang::Sema::LookupParsedName(), clang::NestedNameSpecifierLocBuilder::MakeTrivial(), print(), clang::TreeTransform< Derived >::TransformNestedNameSpecifierLoc(), clang::RecursiveASTVisitor< Derived >::TraverseNestedNameSpecifier(), clang::RecursiveASTVisitor< Derived >::TraverseNestedNameSpecifierLoc(), and clang::serialization::DataStreamBasicWriter< Impl >::writeNestedNameSpecifier().
◆ getPrefix()Return the prefix of this nested name specifier.
The prefix contains all of the parts of the nested name specifier that precede this current specifier. For example, for a nested name specifier that represents "foo::bar::", the current specifier will contain "bar::" and the prefix will contain "foo::".
Definition at line 169 of file NestedNameSpecifier.h.
Referenced by clang::ODRHash::AddNestedNameSpecifier(), clang::TextNodeDumper::dumpNestedNameSpecifier(), clang::Sema::FindFirstQualifierInScope(), clang::ASTContext::getCanonicalNestedNameSpecifier(), getDependence(), clang::Sema::getDestructorName(), GetFullTypeForDeclarator(), clang::Sema::getInheritingConstructorName(), getNestedNameSpecifierIdentifiers(), clang::ASTImporter::Import(), isFullyQualified(), isSameQualifier(), IsStructurallyEquivalent(), clang::NestedNameSpecifierLocBuilder::MakeTrivial(), MarkUsedTemplateParameters(), print(), ScopeSpecifierHasTemplateId(), clang::RecursiveASTVisitor< Derived >::TraverseNestedNameSpecifier(), and clang::serialization::DataStreamBasicWriter< Impl >::writeNestedNameSpecifier().
◆ GlobalSpecifier() ◆ isDependent() bool NestedNameSpecifier::isDependent ( ) constWhether this nested name specifier refers to a dependent type or not.
Definition at line 232 of file NestedNameSpecifier.cpp.
References getDependence().
Referenced by clang::Sema::ActOnFriendFunctionDecl(), clang::Sema::BuildMemberReferenceExpr(), clang::Sema::CheckTypenameType(), clang::Sema::CheckUsingDeclRedeclaration(), clang::SemaCodeCompletion::CodeCompleteQualifiedId(), clang::Sema::computeDeclContext(), Create(), clang::Sema::getCurrentInstantiationOf(), clang::ASTContext::getDependentTemplateName(), clang::ASTContext::getDependentTemplateSpecializationType(), clang::Sema::isDependentScopeSpecifier(), and clang::TreeTransform< Derived >::RebuildDependentNameType().
◆ isInstantiationDependent() bool NestedNameSpecifier::isInstantiationDependent ( ) const ◆ operator=() ◆ print() void NestedNameSpecifier::print ( raw_ostream & OS, const PrintingPolicy & Policy, bool ResolveTemplateArguments =false
) const
Print this nested name specifier to the given output stream.
If ResolveTemplateArguments
is true, we'll print actual types, e.g. ns::SomeTemplate<int, MyClass>
instead of ns::SomeTemplate<Container::value_type, T>
.
Definition at line 250 of file NestedNameSpecifier.cpp.
References getAsIdentifier(), getAsNamespace(), getAsNamespaceAlias(), getAsRecordDecl(), getAsType(), getKind(), clang::NamedDecl::getName(), clang::IdentifierInfo::getName(), getPrefix(), Global, Identifier, Namespace, NamespaceAlias, clang::TemplateName::None, print(), clang::QualType::print(), clang::printTemplateArgumentList(), Super, clang::PrintingPolicy::SuppressScope, clang::T, TypeSpec, and TypeSpecWithTemplate.
Referenced by dump(), clang::FormatASTNodeDiagnosticArgument(), clang::TypoCorrection::getAsString(), MaybeAddOverrideCalls(), clang::ConceptReference::print(), print(), PrintMapper(), and printQualifier().
◆ Profile() void clang::NestedNameSpecifier::Profile ( llvm::FoldingSetNodeID & ID ) const inline ◆ SuperSpecifier()The documentation for this class was generated from the following files:
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4