class UsingShadowDecl

Declaration

class UsingShadowDecl : public NamedDecl, public Redeclarable { /* full declaration omitted */ };

Description

Represents a shadow declaration implicitly introduced into a scope by a (resolved) using-declaration or using-enum-declaration to achieve the desired lookup semantics. For example:

Declared at: clang/include/clang/AST/DeclCXX.h:3220

Inherits from: NamedDecl, Redeclarable

Member Variables

private clang::NamedDecl* Underlying = nullptr
The referenced declaration.
private clang::NamedDecl* UsingOrNextShadow = nullptr
The using declaration which introduced this decl or the next using shadow declaration contained in the aforementioned using declaration.

Inherited from Decl:

protected NextInContextAndBits
protected Access
protected FromASTFile
protected IdentifierNamespace
protected CacheValidAndLinkage

Method Overview

  • public static clang::UsingShadowDecl * Create(clang::ASTContext & C, clang::DeclContext * DC, clang::SourceLocation Loc, clang::DeclarationName Name, clang::BaseUsingDecl * Introducer, clang::NamedDecl * Target)
  • public static clang::UsingShadowDecl * CreateDeserialized(clang::ASTContext & C, unsigned int ID)
  • protected UsingShadowDecl(clang::Decl::Kind K, clang::ASTContext & C, clang::DeclContext * DC, clang::SourceLocation Loc, clang::DeclarationName Name, clang::BaseUsingDecl * Introducer, clang::NamedDecl * Target)
  • protected UsingShadowDecl(clang::Decl::Kind K, clang::ASTContext & C, clang::Decl::EmptyShell)
  • private void anchor()
  • public static bool classof(const clang::Decl * D)
  • public static bool classofKind(clang::Decl::Kind K)
  • public clang::UsingShadowDecl * getCanonicalDecl()
  • public const clang::UsingShadowDecl * getCanonicalDecl() const
  • public clang::BaseUsingDecl * getIntroducer() const
  • private clang::UsingShadowDecl * getMostRecentDeclImpl()
  • private clang::UsingShadowDecl * getNextRedeclarationImpl()
  • public clang::UsingShadowDecl * getNextUsingShadowDecl() const
  • private clang::UsingShadowDecl * getPreviousDeclImpl()
  • public clang::NamedDecl * getTargetDecl() const
  • public void setTargetDecl(clang::NamedDecl * ND)

Inherited from NamedDecl:

Inherited from Decl:

Methods

static clang::UsingShadowDecl* Create(
    clang::ASTContext& C,
    clang::DeclContext* DC,
    clang::SourceLocation Loc,
    clang::DeclarationName Name,
    clang::BaseUsingDecl* Introducer,
    clang::NamedDecl* Target)

Declared at: clang/include/clang/AST/DeclCXX.h:3256

Parameters

clang::ASTContext& C
clang::DeclContext* DC
clang::SourceLocation Loc
clang::DeclarationName Name
clang::BaseUsingDecl* Introducer
clang::NamedDecl* Target

static clang::UsingShadowDecl* CreateDeserialized(
    clang::ASTContext& C,
    unsigned int ID)

Declared at: clang/include/clang/AST/DeclCXX.h:3263

Parameters

clang::ASTContext& C
unsigned int ID

UsingShadowDecl(clang::Decl::Kind K,
                clang::ASTContext& C,
                clang::DeclContext* DC,
                clang::SourceLocation Loc,
                clang::DeclarationName Name,
                clang::BaseUsingDecl* Introducer,
                clang::NamedDecl* Target)

Declared at: clang/include/clang/AST/DeclCXX.h:3247

Parameters

clang::Decl::Kind K
clang::ASTContext& C
clang::DeclContext* DC
clang::SourceLocation Loc
clang::DeclarationName Name
clang::BaseUsingDecl* Introducer
clang::NamedDecl* Target

UsingShadowDecl(clang::Decl::Kind K,
                clang::ASTContext& C,
                clang::Decl::EmptyShell)

Declared at: clang/include/clang/AST/DeclCXX.h:3250

Parameters

clang::Decl::Kind K
clang::ASTContext& C
clang::Decl::EmptyShell

void anchor()

Declared at: clang/include/clang/AST/DeclCXX.h:3230

static bool classof(const clang::Decl* D)

Declared at: clang/include/clang/AST/DeclCXX.h:3308

Parameters

const clang::Decl* D

static bool classofKind(clang::Decl::Kind K)

Declared at: clang/include/clang/AST/DeclCXX.h:3309

Parameters

clang::Decl::Kind K

clang::UsingShadowDecl* getCanonicalDecl()

Description

Retrieves the "canonical" declaration of the given declaration.

Declared at: clang/include/clang/AST/DeclCXX.h:3275

const clang::UsingShadowDecl* getCanonicalDecl()
    const

Declared at: clang/include/clang/AST/DeclCXX.h:3278

clang::BaseUsingDecl* getIntroducer() const

Description

Gets the (written or instantiated) using declaration that introduced this declaration.

Declared at: clang/include/clang/AST/DeclCXX.h:3300

clang::UsingShadowDecl* getMostRecentDeclImpl()

Description

Implementation of getMostRecentDecl(), to be overridden by any subclass that has a redeclaration chain.

Declared at: clang/include/clang/AST/DeclCXX.h:3242

clang::UsingShadowDecl* 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:3234

clang::UsingShadowDecl* getNextUsingShadowDecl()
    const

Description

The next using shadow declaration contained in the shadow decl chain of the using declaration which introduced this decl.

Declared at: clang/include/clang/AST/DeclCXX.h:3304

clang::UsingShadowDecl* getPreviousDeclImpl()

Description

Implementation of getPreviousDecl(), to be overridden by any subclass that has a redeclaration chain.

Declared at: clang/include/clang/AST/DeclCXX.h:3238

clang::NamedDecl* getTargetDecl() const

Description

Gets the underlying declaration which has been brought into the local scope.

Declared at: clang/include/clang/AST/DeclCXX.h:3284

void setTargetDecl(clang::NamedDecl* ND)

Description

Sets the underlying declaration which has been brought into the local scope.

Declared at: clang/include/clang/AST/DeclCXX.h:3288

Parameters

clang::NamedDecl* ND