clang API Documentation
Represents a shadow declaration introduced into a scope by a (resolved) using declaration. More...
#include <DeclCXX.h>
Public Types | |
typedef redeclarable_base::redecl_range | redecl_range |
typedef redeclarable_base::redecl_iterator | redecl_iterator |
Public Member Functions | |
UsingShadowDecl * | getCanonicalDecl () override |
Retrieves the "canonical" declaration of the given declaration. | |
const UsingShadowDecl * | getCanonicalDecl () const |
NamedDecl * | getTargetDecl () 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. | |
UsingDecl * | getUsingDecl () const |
Gets the using declaration to which this declaration is tied. | |
UsingShadowDecl * | getNextUsingShadowDecl () 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 UsingShadowDecl * | Create (ASTContext &C, DeclContext *DC, SourceLocation Loc, UsingDecl *Using, NamedDecl *Target) |
static UsingShadowDecl * | CreateDeserialized (ASTContext &C, unsigned ID) |
static bool | classof (const Decl *D) |
static bool | classofKind (Kind K) |
Friends | |
class | UsingDecl |
class | ASTDeclReader |
class | ASTDeclWriter |
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 }
typedef redeclarable_base::redecl_iterator clang::UsingShadowDecl::redecl_iterator |
Reimplemented from clang::Redeclarable< UsingShadowDecl >.
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().
UsingShadowDecl * UsingShadowDecl::CreateDeserialized | ( | ASTContext & | C, |
unsigned | ID | ||
) | [static] |
Definition at line 2040 of file DeclCXX.cpp.
References AttributeLangSupport::C.
UsingShadowDecl* clang::UsingShadowDecl::getCanonicalDecl | ( | ) | [inline, override, virtual] |
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().
const UsingShadowDecl* clang::UsingShadowDecl::getCanonicalDecl | ( | ) | const [inline] |
Reimplemented from clang::Decl.
Definition at line 2825 of file DeclCXX.h.
References clang::Redeclarable< UsingShadowDecl >::getFirstDecl().
UsingShadowDecl* clang::UsingShadowDecl::getNextUsingShadowDecl | ( | ) | const [inline] |
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++().
NamedDecl* clang::UsingShadowDecl::getTargetDecl | ( | ) | const [inline] |
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().
UsingDecl * UsingShadowDecl::getUsingDecl | ( | ) | const |
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().
void clang::UsingShadowDecl::setTargetDecl | ( | NamedDecl * | ND | ) | [inline] |
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().
friend class ASTDeclReader [friend] |
Reimplemented from clang::Redeclarable< UsingShadowDecl >.
friend class ASTDeclWriter [friend] |
Reimplemented from clang::Redeclarable< UsingShadowDecl >.