clang API Documentation

Public Types | Public Member Functions | Static Public Member Functions | Friends
clang::UsingShadowDecl Class Reference

Represents a shadow declaration introduced into a scope by a (resolved) using declaration. More...

#include <DeclCXX.h>

Inheritance diagram for clang::UsingShadowDecl:
Inheritance graph
[legend]
Collaboration diagram for clang::UsingShadowDecl:
Collaboration graph
[legend]

List of all members.

Public Types

typedef
redeclarable_base::redecl_range 
redecl_range
typedef
redeclarable_base::redecl_iterator 
redecl_iterator

Public Member Functions

UsingShadowDeclgetCanonicalDecl () override
 Retrieves the "canonical" declaration of the given declaration.
const UsingShadowDeclgetCanonicalDecl () const
NamedDeclgetTargetDecl () const
 Gets the underlying declaration which has been brought into the local scope.
void setTargetDecl (NamedDecl *ND)
 Sets the underlying declaration which has been brought into the local scope.
UsingDeclgetUsingDecl () const
 Gets the using declaration to which this declaration is tied.
UsingShadowDeclgetNextUsingShadowDecl () const
 The next using shadow declaration contained in the shadow decl chain of the using declaration which introduced this decl.

Static Public Member Functions

static UsingShadowDeclCreate (ASTContext &C, DeclContext *DC, SourceLocation Loc, UsingDecl *Using, NamedDecl *Target)
static UsingShadowDeclCreateDeserialized (ASTContext &C, unsigned ID)
static bool classof (const Decl *D)
static bool classofKind (Kind K)

Friends

class UsingDecl
class ASTDeclReader
class ASTDeclWriter

Detailed Description

Represents a shadow declaration introduced into a scope by a (resolved) using declaration.

For example,

 namespace A {
   void foo();
 }
 namespace B {
   using A::foo; // <- a UsingDecl
                 // Also creates a UsingShadowDecl for A::foo() in B
 }

Definition at line 2771 of file DeclCXX.h.


Member Typedef Documentation

typedef redeclarable_base::redecl_iterator clang::UsingShadowDecl::redecl_iterator

Definition at line 2815 of file DeclCXX.h.

Reimplemented from clang::Redeclarable< UsingShadowDecl >.

Definition at line 2814 of file DeclCXX.h.


Member Function Documentation

static bool clang::UsingShadowDecl::classof ( const Decl D) [inline, static]

Reimplemented from clang::NamedDecl.

Definition at line 2850 of file DeclCXX.h.

References classofKind(), and clang::Decl::getKind().

static bool clang::UsingShadowDecl::classofKind ( Kind  K) [inline, static]

Reimplemented from clang::NamedDecl.

Definition at line 2851 of file DeclCXX.h.

Referenced by classof().

static UsingShadowDecl* clang::UsingShadowDecl::Create ( ASTContext C,
DeclContext DC,
SourceLocation  Loc,
UsingDecl Using,
NamedDecl Target 
) [inline, static]

Definition at line 2806 of file DeclCXX.h.

References AttributeLangSupport::C.

Referenced by clang::Sema::BuildUsingShadowDecl().

Definition at line 2040 of file DeclCXX.cpp.

References AttributeLangSupport::C.

Retrieves the "canonical" declaration of the given declaration.

Reimplemented from clang::Decl.

Definition at line 2822 of file DeclCXX.h.

References clang::Redeclarable< UsingShadowDecl >::getFirstDecl().

Reimplemented from clang::Decl.

Definition at line 2825 of file DeclCXX.h.

References clang::Redeclarable< UsingShadowDecl >::getFirstDecl().

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

Definition at line 2846 of file DeclCXX.h.

Referenced by clang::UsingDecl::shadow_iterator::operator++().

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

Definition at line 2831 of file DeclCXX.h.

Referenced by isSameEntity(), and clang::ASTDeclWriter::VisitUsingShadowDecl().

Gets the using declaration to which this declaration is tied.

Definition at line 2045 of file DeclCXX.cpp.

Referenced by clang::UsingDecl::addShadowDecl(), clang::Sema::HideUsingShadowDecl(), and clang::UsingDecl::removeShadowDecl().

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

Definition at line 2835 of file DeclCXX.h.

References clang::Decl::getIdentifierNamespace().

Referenced by clang::ASTDeclReader::VisitUsingShadowDecl().


Friends And Related Function Documentation

friend class ASTDeclReader [friend]

Reimplemented from clang::Redeclarable< UsingShadowDecl >.

Definition at line 2853 of file DeclCXX.h.

friend class ASTDeclWriter [friend]

Reimplemented from clang::Redeclarable< UsingShadowDecl >.

Definition at line 2854 of file DeclCXX.h.

friend class UsingDecl [friend]

Definition at line 2780 of file DeclCXX.h.


The documentation for this class was generated from the following files: