class NamespaceAliasDecl
Declaration
class NamespaceAliasDecl : public NamedDecl, public Redeclarable { /* full declaration omitted */ };
Description
Represents a C++ namespace alias. For example:
Declared at: clang/include/clang/AST/DeclCXX.h:3019
Inherits from: NamedDecl, Redeclarable
Member Variables
- private clang::SourceLocation NamespaceLoc
- The location of the \c namespace keyword.
- private clang::SourceLocation IdentLoc
- This is accessed by TargetNameLoc.
- private clang::NestedNameSpecifierLoc QualifierLoc
- The nested-name-specifier that precedes the namespace.
- private clang::NamedDecl* Namespace
- The Decl that this alias points to, either a NamespaceDecl or a NamespaceAliasDecl.
Inherited from Decl:
- protected NextInContextAndBits
- protected Access
- protected FromASTFile
- protected IdentifierNamespace
- protected CacheValidAndLinkage
Method Overview
- public static clang::NamespaceAliasDecl * Create(clang::ASTContext & C, clang::DeclContext * DC, clang::SourceLocation NamespaceLoc, clang::SourceLocation AliasLoc, clang::IdentifierInfo * Alias, clang::NestedNameSpecifierLoc QualifierLoc, clang::SourceLocation IdentLoc, clang::NamedDecl * Namespace)
- public static clang::NamespaceAliasDecl * CreateDeserialized(clang::ASTContext & C, unsigned int ID)
- private NamespaceAliasDecl(clang::ASTContext & C, clang::DeclContext * DC, clang::SourceLocation NamespaceLoc, clang::SourceLocation AliasLoc, clang::IdentifierInfo * Alias, clang::NestedNameSpecifierLoc QualifierLoc, clang::SourceLocation IdentLoc, clang::NamedDecl * Namespace)
- private void anchor()
- public static bool classof(const clang::Decl * D)
- public static bool classofKind(clang::Decl::Kind K)
- public clang::SourceLocation getAliasLoc() const
- public clang::NamedDecl * getAliasedNamespace() const
- public clang::NamespaceAliasDecl * getCanonicalDecl()
- public const clang::NamespaceAliasDecl * getCanonicalDecl() const
- private clang::NamespaceAliasDecl * getMostRecentDeclImpl()
- public clang::NamespaceDecl * getNamespace()
- public const clang::NamespaceDecl * getNamespace() const
- public clang::SourceLocation getNamespaceLoc() const
- private clang::NamespaceAliasDecl * getNextRedeclarationImpl()
- private clang::NamespaceAliasDecl * getPreviousDeclImpl()
- public clang::NestedNameSpecifier * getQualifier() const
- public clang::NestedNameSpecifierLoc getQualifierLoc() const
- public clang::SourceRange getSourceRange() const
- public clang::SourceLocation getTargetNameLoc() const
Inherited from NamedDecl:
- public classof
- public classofKind
- public declarationReplaces
- public getDeclName
- public getExplicitVisibility
- public getFormalLinkage
- public getIdentifier
- public getLinkageAndVisibility
- public getLinkageInternal
- public getMostRecentDecl
- public getMostRecentDecl
- public getName
- public getNameAsString
- public getNameForDiagnostic
- public getObjCFStringFormattingFamily
- public getQualifiedNameAsString
- public getUnderlyingDecl
- public getUnderlyingDecl
- public getVisibility
- public hasExternalFormalLinkage
- public hasLinkage
- public hasLinkageBeenComputed
- public isCXXClassMember
- public isCXXInstanceMember
- public isExternallyDeclarable
- public isExternallyVisible
- public isLinkageValid
- public isReserved
- public printName
- public printNestedNameSpecifier
- public printNestedNameSpecifier
- public printQualifiedName
- public printQualifiedName
- public setDeclName
Inherited from Decl:
- public EnableStatistics
- public PrintStats
- public add
- public addAttr
- public attr_begin
- public attr_end
- public attrs
- public canBeWeakImported
- public castFromDeclContext
- public castToDeclContext
- public classofKind
- public dropAttr
- public dropAttrs
- public dump
- public dump
- public dumpColor
- public getASTContext
- protected getASTMutationListener
- public getAccess
- public getAccessUnsafe
- public getAsFunction
- public getAsFunction
- public getAttr
- public getAttrs
- public getAttrs
- public getAvailability
- public getBeginLoc
- public getBody
- public getBodyRBrace
- protected getCachedLinkage
- public getCanonicalDecl
- public getCanonicalDecl
- public getDeclContext
- public getDeclContext
- public getDeclKindName
- public getDefiningAttr
- public getDescribedTemplate
- public getDescribedTemplateParams
- public getEndLoc
- public getExternalSourceSymbolAttr
- public getFriendObjectKind
- public getFunctionType
- public getGlobalID
- public getID
- public getIdentifierNamespace
- public getIdentifierNamespaceForKind
- public getImportedOwningModule
- public getKind
- public getLangOpts
- public getLexicalDeclContext
- public getLexicalDeclContext
- public getLocalOwningModule
- public getLocation
- public getMaxAlignment
- public getModuleOwnershipKind
- public getMostRecentDecl
- public getMostRecentDecl
- protected getMostRecentDeclImpl
- public getNextDeclInContext
- public getNextDeclInContext
- protected getNextRedeclarationImpl
- public getNonClosureContext
- public getNonClosureContext
- public getOwningModule
- public getOwningModuleForLinkage
- public getOwningModuleID
- public getParentFunctionOrMethod
- public getParentFunctionOrMethod
- public getPreviousDecl
- public getPreviousDecl
- protected getPreviousDeclImpl
- public getSourceRange
- public getTemplateDepth
- public getTranslationUnitDecl
- public getTranslationUnitDecl
- public getVersionIntroduced
- public hasAttr
- public hasAttrs
- public hasBody
- protected hasCachedLinkage
- public hasDefiningAttr
- protected hasLocalOwningModuleStorage
- public hasOwningModule
- public hasTagIdentifierNamespace
- public isCanonicalDecl
- public isDefinedOutsideFunctionOrMethod
- public isDeprecated
- public isDiscardedInGlobalModuleFragment
- public isFirstDecl
- public isFromASTFile
- public isFunctionOrFunctionTemplate
- public isImplicit
- public isInAnonymousNamespace
- public isInExportDeclContext
- public isInIdentifierNamespace
- public isInLocalScopeForInstantiation
- public isInStdNamespace
- public isInvalidDecl
- public isInvisibleOutsideTheOwningModule
- public isLocalExternDecl
- public isModulePrivate
- public isOutOfLine
- public isParameterPack
- public isReachable
- public isReferenced
- public isTagIdentifierNamespace
- public isTemplateDecl
- public isTemplateParameter
- public isTemplateParameterPack
- public isTemplated
- public isThisDeclarationReferenced
- public isTopLevelDeclInObjCContainer
- public isUnavailable
- public isUnconditionallyVisible
- public isUsed
- public isWeakImported
- public markUsed
- public print
- public print
- public printGroup
- public redecls
- public redecls_begin
- public redecls_end
- public setAccess
- public setAttrs
- protected setCachedLinkage
- public setDeclContext
- public setFromASTFile
- public setImplicit
- public setInvalidDecl
- public setIsUsed
- public setLexicalDeclContext
- public setLocalExternDecl
- public setLocalOwningModule
- public setLocation
- public setModuleOwnershipKind
- protected setModulePrivate
- public setNonMemberOperator
- public setObjectOfFriendDecl
- public setOwningModuleID
- public setReferenced
- public setTopLevelDeclInObjCContainer
- public setVisibleDespiteOwningModule
- public specific_attr_begin
- public specific_attr_end
- public specific_attrs
- protected updateOutOfDate
Methods
¶static clang::NamespaceAliasDecl* Create(
clang::ASTContext& C,
clang::DeclContext* DC,
clang::SourceLocation NamespaceLoc,
clang::SourceLocation AliasLoc,
clang::IdentifierInfo* Alias,
clang::NestedNameSpecifierLoc QualifierLoc,
clang::SourceLocation IdentLoc,
clang::NamedDecl* Namespace)
static clang::NamespaceAliasDecl* Create(
clang::ASTContext& C,
clang::DeclContext* DC,
clang::SourceLocation NamespaceLoc,
clang::SourceLocation AliasLoc,
clang::IdentifierInfo* Alias,
clang::NestedNameSpecifierLoc QualifierLoc,
clang::SourceLocation IdentLoc,
clang::NamedDecl* Namespace)
Declared at: clang/include/clang/AST/DeclCXX.h:3055
Parameters
- clang::ASTContext& C
- clang::DeclContext* DC
- clang::SourceLocation NamespaceLoc
- clang::SourceLocation AliasLoc
- clang::IdentifierInfo* Alias
- clang::NestedNameSpecifierLoc QualifierLoc
- clang::SourceLocation IdentLoc
- clang::NamedDecl* Namespace
¶static clang::NamespaceAliasDecl*
CreateDeserialized(clang::ASTContext& C,
unsigned int ID)
static clang::NamespaceAliasDecl*
CreateDeserialized(clang::ASTContext& C,
unsigned int ID)
Declared at: clang/include/clang/AST/DeclCXX.h:3063
Parameters
- clang::ASTContext& C
- unsigned int ID
¶NamespaceAliasDecl(
clang::ASTContext& C,
clang::DeclContext* DC,
clang::SourceLocation NamespaceLoc,
clang::SourceLocation AliasLoc,
clang::IdentifierInfo* Alias,
clang::NestedNameSpecifierLoc QualifierLoc,
clang::SourceLocation IdentLoc,
clang::NamedDecl* Namespace)
NamespaceAliasDecl(
clang::ASTContext& C,
clang::DeclContext* DC,
clang::SourceLocation NamespaceLoc,
clang::SourceLocation AliasLoc,
clang::IdentifierInfo* Alias,
clang::NestedNameSpecifierLoc QualifierLoc,
clang::SourceLocation IdentLoc,
clang::NamedDecl* Namespace)
Declared at: clang/include/clang/AST/DeclCXX.h:3038
Parameters
- clang::ASTContext& C
- clang::DeclContext* DC
- clang::SourceLocation NamespaceLoc
- clang::SourceLocation AliasLoc
- clang::IdentifierInfo* Alias
- clang::NestedNameSpecifierLoc QualifierLoc
- clang::SourceLocation IdentLoc
- clang::NamedDecl* Namespace
¶void anchor()
void anchor()
Declared at: clang/include/clang/AST/DeclCXX.h:3046
¶static bool classof(const clang::Decl* D)
static bool classof(const clang::Decl* D)
Declared at: clang/include/clang/AST/DeclCXX.h:3121
Parameters
- const clang::Decl* D
¶static bool classofKind(clang::Decl::Kind K)
static bool classofKind(clang::Decl::Kind K)
Declared at: clang/include/clang/AST/DeclCXX.h:3122
Parameters
- clang::Decl::Kind K
¶clang::SourceLocation getAliasLoc() const
clang::SourceLocation getAliasLoc() const
Description
Returns the location of the alias name, i.e. 'foo' in "namespace foo = ns::bar;".
Declared at: clang/include/clang/AST/DeclCXX.h:3105
¶clang::NamedDecl* getAliasedNamespace() const
clang::NamedDecl* getAliasedNamespace() const
Description
Retrieve the namespace that this alias refers to, which may either be a NamespaceDecl or a NamespaceAliasDecl.
Declared at: clang/include/clang/AST/DeclCXX.h:3115
¶clang::NamespaceAliasDecl* getCanonicalDecl()
clang::NamespaceAliasDecl* getCanonicalDecl()
Description
Retrieves the "canonical" declaration of the given declaration.
Declared at: clang/include/clang/AST/DeclCXX.h:3074
¶const clang::NamespaceAliasDecl*
getCanonicalDecl() const
const clang::NamespaceAliasDecl*
getCanonicalDecl() const
Declared at: clang/include/clang/AST/DeclCXX.h:3077
¶clang::NamespaceAliasDecl* getMostRecentDeclImpl()
clang::NamespaceAliasDecl* getMostRecentDeclImpl()
Description
Implementation of getMostRecentDecl(), to be overridden by any subclass that has a redeclaration chain.
Declared at: clang/include/clang/AST/DeclCXX.h:3052
¶clang::NamespaceDecl* getNamespace()
clang::NamespaceDecl* getNamespace()
Description
Retrieve the namespace declaration aliased by this directive.
Declared at: clang/include/clang/AST/DeclCXX.h:3092
¶const clang::NamespaceDecl* getNamespace() const
const clang::NamespaceDecl* getNamespace() const
Declared at: clang/include/clang/AST/DeclCXX.h:3099
¶clang::SourceLocation getNamespaceLoc() const
clang::SourceLocation getNamespaceLoc() const
Description
Returns the location of the \c namespace keyword.
Declared at: clang/include/clang/AST/DeclCXX.h:3108
¶clang::NamespaceAliasDecl*
getNextRedeclarationImpl()
clang::NamespaceAliasDecl*
getNextRedeclarationImpl()
Description
Returns the next redeclaration or itself if this is the only decl. Decl subclasses that can be redeclared should override this method so that Decl::redecl_iterator can iterate over them.
Declared at: clang/include/clang/AST/DeclCXX.h:3050
¶clang::NamespaceAliasDecl* getPreviousDeclImpl()
clang::NamespaceAliasDecl* getPreviousDeclImpl()
Description
Implementation of getPreviousDecl(), to be overridden by any subclass that has a redeclaration chain.
Declared at: clang/include/clang/AST/DeclCXX.h:3051
¶clang::NestedNameSpecifier* getQualifier() const
clang::NestedNameSpecifier* getQualifier() const
Description
Retrieve the nested-name-specifier that qualifies the name of the namespace.
Declared at: clang/include/clang/AST/DeclCXX.h:3087
¶clang::NestedNameSpecifierLoc getQualifierLoc()
const
clang::NestedNameSpecifierLoc getQualifierLoc()
const
Description
Retrieve the nested-name-specifier that qualifies the name of the namespace, with source-location information.
Declared at: clang/include/clang/AST/DeclCXX.h:3083
¶clang::SourceRange getSourceRange() const
clang::SourceRange getSourceRange() const
Description
Source range that this declaration covers.
Declared at: clang/include/clang/AST/DeclCXX.h:3117
¶clang::SourceLocation getTargetNameLoc() const
clang::SourceLocation getTargetNameLoc() const
Description
Returns the location of the identifier in the named namespace.
Declared at: clang/include/clang/AST/DeclCXX.h:3111