clang API Documentation

Classes | Public Types | Public Member Functions | Static Public Member Functions | Friends
clang::UsingDecl Class Reference

Represents a C++ using-declaration. More...

#include <DeclCXX.h>

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

List of all members.

Classes

class  shadow_iterator
 Iterates through the using shadow declarations associated with this using declaration. More...

Public Types

typedef llvm::iterator_range
< shadow_iterator
shadow_range

Public Member Functions

SourceLocation getUsingLoc () const
 Return the source location of the 'using' keyword.
void setUsingLoc (SourceLocation L)
 Set the source location of the 'using' keyword.
NestedNameSpecifierLoc getQualifierLoc () const
 Retrieve the nested-name-specifier that qualifies the name, with source-location information.
NestedNameSpecifiergetQualifier () const
 Retrieve the nested-name-specifier that qualifies the name.
DeclarationNameInfo getNameInfo () const
bool isAccessDeclaration () const
 Return true if it is a C++03 access declaration (no 'using').
bool hasTypename () const
 Return true if the using declaration has 'typename'.
void setTypename (bool TN)
 Sets whether the using declaration has 'typename'.
shadow_range shadows () const
shadow_iterator shadow_begin () const
shadow_iterator shadow_end () const
unsigned shadow_size () const
 Return the number of shadowed declarations associated with this using declaration.
void addShadowDecl (UsingShadowDecl *S)
void removeShadowDecl (UsingShadowDecl *S)
SourceRange getSourceRange () const override LLVM_READONLY
 Source range that this declaration covers.
UsingDeclgetCanonicalDecl () override
 Retrieves the canonical declaration of this declaration.
const UsingDeclgetCanonicalDecl () const

Static Public Member Functions

static UsingDeclCreate (ASTContext &C, DeclContext *DC, SourceLocation UsingL, NestedNameSpecifierLoc QualifierLoc, const DeclarationNameInfo &NameInfo, bool HasTypenameKeyword)
static UsingDeclCreateDeserialized (ASTContext &C, unsigned ID)
static bool classof (const Decl *D)
static bool classofKind (Kind K)

Friends

class ASTDeclReader
class ASTDeclWriter

Detailed Description

Represents a C++ using-declaration.

For example:

    using someNameSpace::someIdentifier;

Definition at line 2863 of file DeclCXX.h.


Member Typedef Documentation

typedef llvm::iterator_range<shadow_iterator> clang::UsingDecl::shadow_range

Definition at line 2958 of file DeclCXX.h.


Member Function Documentation

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

Reimplemented from clang::NamedDecl.

Definition at line 2991 of file DeclCXX.h.

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

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

Reimplemented from clang::NamedDecl.

Definition at line 2992 of file DeclCXX.h.

Referenced by classof().

UsingDecl * UsingDecl::Create ( ASTContext C,
DeclContext DC,
SourceLocation  UsingL,
NestedNameSpecifierLoc  QualifierLoc,
const DeclarationNameInfo NameInfo,
bool  HasTypenameKeyword 
) [static]

Definition at line 2086 of file DeclCXX.cpp.

References AttributeLangSupport::C.

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

Definition at line 2093 of file DeclCXX.cpp.

References AttributeLangSupport::C.

UsingDecl* clang::UsingDecl::getCanonicalDecl ( ) [inline, override, virtual]

Retrieves the canonical declaration of this declaration.

Reimplemented from clang::Decl.

Definition at line 2988 of file DeclCXX.h.

References clang::Mergeable< UsingDecl >::getFirstDecl().

const UsingDecl* clang::UsingDecl::getCanonicalDecl ( ) const [inline]

Reimplemented from clang::Decl.

Definition at line 2989 of file DeclCXX.h.

References clang::Mergeable< UsingDecl >::getFirstDecl().

Retrieve the nested-name-specifier that qualifies the name.

Definition at line 2903 of file DeclCXX.h.

References clang::NestedNameSpecifierLoc::getNestedNameSpecifier().

Referenced by clang::Sema::CheckInheritingConstructorUsingDecl(), and clang::Sema::CheckUsingShadowDecl().

Retrieve the nested-name-specifier that qualifies the name, with source-location information.

Definition at line 2900 of file DeclCXX.h.

Referenced by clang::Sema::CheckUsingShadowDecl(), getSourceRange(), and clang::ASTDeclWriter::VisitUsingDecl().

SourceRange UsingDecl::getSourceRange ( ) const [override, virtual]

Source range that this declaration covers.

Reimplemented from clang::Decl.

Definition at line 2099 of file DeclCXX.cpp.

References clang::NestedNameSpecifierLoc::getBeginLoc(), getNameInfo(), getQualifierLoc(), and isAccessDeclaration().

Return the source location of the 'using' keyword.

Definition at line 2893 of file DeclCXX.h.

Referenced by clang::Sema::CheckInheritingConstructorUsingDecl(), and clang::ASTDeclWriter::VisitUsingDecl().

bool clang::UsingDecl::hasTypename ( ) const [inline]

Return true if the using declaration has 'typename'.

Definition at line 2915 of file DeclCXX.h.

Referenced by clang::Sema::CheckInheritingConstructorUsingDecl(), clang::TreeTransform< Derived >::RebuildUnresolvedUsingType(), and clang::ASTDeclWriter::VisitUsingDecl().

Return true if it is a C++03 access declaration (no 'using').

Definition at line 2912 of file DeclCXX.h.

References clang::SourceLocation::isInvalid().

Referenced by getSourceRange().

void clang::UsingDecl::setTypename ( bool  TN) [inline]

Sets whether the using declaration has 'typename'.

Definition at line 2918 of file DeclCXX.h.

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

Set the source location of the 'using' keyword.

Definition at line 2896 of file DeclCXX.h.

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

Return the number of shadowed declarations associated with this using declaration.

Definition at line 2970 of file DeclCXX.h.

References shadow_begin(), and shadow_end().

Referenced by clang::CodeGen::CGDebugInfo::EmitUsingDecl().

Definition at line 2960 of file DeclCXX.h.

References shadow_begin(), and shadow_end().


Friends And Related Function Documentation

friend class ASTDeclReader [friend]

Reimplemented from clang::Decl.

Definition at line 2994 of file DeclCXX.h.

friend class ASTDeclWriter [friend]

Reimplemented from clang::Decl.

Definition at line 2995 of file DeclCXX.h.


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