class UsingDirectiveDecl
Declaration
class UsingDirectiveDecl : public NamedDecl { /* full declaration omitted */ };
Description
Represents C++ using-directive. For example:
Declared at: clang/include/clang/AST/DeclCXX.h:2915
Inherits from: NamedDecl
Member Variables
- private clang::SourceLocation UsingLoc
- The location of the \c using keyword.
- private clang::SourceLocation NamespaceLoc
- The location of the \c namespace keyword.
- private clang::NestedNameSpecifierLoc QualifierLoc
- The nested-name-specifier that precedes the namespace.
- private clang::NamedDecl* NominatedNamespace
- The namespace nominated by this using-directive.
- private clang::DeclContext* CommonAncestor
- Enclosing context containing both using-directive and nominated namespace.
Inherited from Decl:
- protected NextInContextAndBits
- protected Access
- protected FromASTFile
- protected IdentifierNamespace
- protected CacheValidAndLinkage
Method Overview
- public static clang::UsingDirectiveDecl * Create(clang::ASTContext & C, clang::DeclContext * DC, clang::SourceLocation UsingLoc, clang::SourceLocation NamespaceLoc, clang::NestedNameSpecifierLoc QualifierLoc, clang::SourceLocation IdentLoc, clang::NamedDecl * Nominated, clang::DeclContext * CommonAncestor)
- public static clang::UsingDirectiveDecl * CreateDeserialized(clang::ASTContext & C, unsigned int ID)
- private UsingDirectiveDecl(clang::DeclContext * DC, clang::SourceLocation UsingLoc, clang::SourceLocation NamespcLoc, clang::NestedNameSpecifierLoc QualifierLoc, clang::SourceLocation IdentLoc, clang::NamedDecl * Nominated, clang::DeclContext * CommonAncestor)
- private void anchor()
- public static bool classof(const clang::Decl * D)
- public static bool classofKind(clang::Decl::Kind K)
- public clang::DeclContext * getCommonAncestor()
- public const clang::DeclContext * getCommonAncestor() const
- public clang::SourceLocation getIdentLocation() const
- private static clang::DeclarationName getName()
- public clang::SourceLocation getNamespaceKeyLocation() const
- public const clang::NamespaceDecl * getNominatedNamespace() const
- public clang::NamespaceDecl * getNominatedNamespace()
- public const clang::NamedDecl * getNominatedNamespaceAsWritten() const
- public clang::NamedDecl * getNominatedNamespaceAsWritten()
- public clang::NestedNameSpecifier * getQualifier() const
- public clang::NestedNameSpecifierLoc getQualifierLoc() const
- public clang::SourceRange getSourceRange() const
- public clang::SourceLocation getUsingLoc() 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::UsingDirectiveDecl* Create(
clang::ASTContext& C,
clang::DeclContext* DC,
clang::SourceLocation UsingLoc,
clang::SourceLocation NamespaceLoc,
clang::NestedNameSpecifierLoc QualifierLoc,
clang::SourceLocation IdentLoc,
clang::NamedDecl* Nominated,
clang::DeclContext* CommonAncestor)
static clang::UsingDirectiveDecl* Create(
clang::ASTContext& C,
clang::DeclContext* DC,
clang::SourceLocation UsingLoc,
clang::SourceLocation NamespaceLoc,
clang::NestedNameSpecifierLoc QualifierLoc,
clang::SourceLocation IdentLoc,
clang::NamedDecl* Nominated,
clang::DeclContext* CommonAncestor)
Declared at: clang/include/clang/AST/DeclCXX.h:2995
Parameters
- clang::ASTContext& C
- clang::DeclContext* DC
- clang::SourceLocation UsingLoc
- clang::SourceLocation NamespaceLoc
- clang::NestedNameSpecifierLoc QualifierLoc
- clang::SourceLocation IdentLoc
- clang::NamedDecl* Nominated
- clang::DeclContext* CommonAncestor
¶static clang::UsingDirectiveDecl*
CreateDeserialized(clang::ASTContext& C,
unsigned int ID)
static clang::UsingDirectiveDecl*
CreateDeserialized(clang::ASTContext& C,
unsigned int ID)
Declared at: clang/include/clang/AST/DeclCXX.h:3002
Parameters
- clang::ASTContext& C
- unsigned int ID
¶UsingDirectiveDecl(
clang::DeclContext* DC,
clang::SourceLocation UsingLoc,
clang::SourceLocation NamespcLoc,
clang::NestedNameSpecifierLoc QualifierLoc,
clang::SourceLocation IdentLoc,
clang::NamedDecl* Nominated,
clang::DeclContext* CommonAncestor)
UsingDirectiveDecl(
clang::DeclContext* DC,
clang::SourceLocation UsingLoc,
clang::SourceLocation NamespcLoc,
clang::NestedNameSpecifierLoc QualifierLoc,
clang::SourceLocation IdentLoc,
clang::NamedDecl* Nominated,
clang::DeclContext* CommonAncestor)
Declared at: clang/include/clang/AST/DeclCXX.h:2932
Parameters
- clang::DeclContext* DC
- clang::SourceLocation UsingLoc
- clang::SourceLocation NamespcLoc
- clang::NestedNameSpecifierLoc QualifierLoc
- clang::SourceLocation IdentLoc
- clang::NamedDecl* Nominated
- clang::DeclContext* CommonAncestor
¶void anchor()
void anchor()
Declared at: clang/include/clang/AST/DeclCXX.h:2950
¶static bool classof(const clang::Decl* D)
static bool classof(const clang::Decl* D)
Declared at: clang/include/clang/AST/DeclCXX.h:3008
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:3009
Parameters
- clang::Decl::Kind K
¶clang::DeclContext* getCommonAncestor()
clang::DeclContext* getCommonAncestor()
Description
Returns the common ancestor context of this using-directive and its nominated namespace.
Declared at: clang/include/clang/AST/DeclCXX.h:2982
¶const clang::DeclContext* getCommonAncestor()
const
const clang::DeclContext* getCommonAncestor()
const
Declared at: clang/include/clang/AST/DeclCXX.h:2983
¶clang::SourceLocation getIdentLocation() const
clang::SourceLocation getIdentLocation() const
Description
Returns the location of this using declaration's identifier.
Declared at: clang/include/clang/AST/DeclCXX.h:2993
¶static clang::DeclarationName getName()
static clang::DeclarationName getName()
Description
Returns special DeclarationName used by using-directives. This is only used by DeclContext for storing UsingDirectiveDecls in its lookup structure.
Declared at: clang/include/clang/AST/DeclCXX.h:2946
¶clang::SourceLocation getNamespaceKeyLocation()
const
clang::SourceLocation getNamespaceKeyLocation()
const
Description
Returns the location of the \c namespace keyword.
Declared at: clang/include/clang/AST/DeclCXX.h:2990
¶const clang::NamespaceDecl*
getNominatedNamespace() const
const clang::NamespaceDecl*
getNominatedNamespace() const
Declared at: clang/include/clang/AST/DeclCXX.h:2976
¶clang::NamespaceDecl* getNominatedNamespace()
clang::NamespaceDecl* getNominatedNamespace()
Description
Returns the namespace nominated by this using-directive.
Declared at: clang/include/clang/AST/DeclCXX.h:2974
¶const clang::NamedDecl*
getNominatedNamespaceAsWritten() const
const clang::NamedDecl*
getNominatedNamespaceAsWritten() const
Declared at: clang/include/clang/AST/DeclCXX.h:2969
¶clang::NamedDecl* getNominatedNamespaceAsWritten()
clang::NamedDecl* getNominatedNamespaceAsWritten()
Declared at: clang/include/clang/AST/DeclCXX.h:2968
¶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:2964
¶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:2960
¶clang::SourceRange getSourceRange() const
clang::SourceRange getSourceRange() const
Description
Source range that this declaration covers.
Declared at: clang/include/clang/AST/DeclCXX.h:3004
¶clang::SourceLocation getUsingLoc() const
clang::SourceLocation getUsingLoc() const
Description
Return the location of the \c using keyword.
Declared at: clang/include/clang/AST/DeclCXX.h:2986