clang API Documentation
Represents a C++ using-declaration. More...
#include <DeclCXX.h>
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. | |
NestedNameSpecifier * | getQualifier () 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. | |
UsingDecl * | getCanonicalDecl () override |
Retrieves the canonical declaration of this declaration. | |
const UsingDecl * | getCanonicalDecl () const |
Static Public Member Functions | |
static UsingDecl * | Create (ASTContext &C, DeclContext *DC, SourceLocation UsingL, NestedNameSpecifierLoc QualifierLoc, const DeclarationNameInfo &NameInfo, bool HasTypenameKeyword) |
static UsingDecl * | CreateDeserialized (ASTContext &C, unsigned ID) |
static bool | classof (const Decl *D) |
static bool | classofKind (Kind K) |
Friends | |
class | ASTDeclReader |
class | ASTDeclWriter |
Represents a C++ using-declaration.
For example:
using someNameSpace::someIdentifier;
typedef llvm::iterator_range<shadow_iterator> clang::UsingDecl::shadow_range |
void UsingDecl::addShadowDecl | ( | UsingShadowDecl * | S | ) |
Definition at line 2055 of file DeclCXX.cpp.
References clang::UsingShadowDecl::getUsingDecl(), shadow_begin(), and shadow_end().
Referenced by clang::Sema::BuildUsingShadowDecl().
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().
UsingDecl * UsingDecl::CreateDeserialized | ( | ASTContext & | C, |
unsigned | ID | ||
) | [static] |
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().
DeclarationNameInfo clang::UsingDecl::getNameInfo | ( | ) | const [inline] |
Definition at line 2907 of file DeclCXX.h.
References clang::NamedDecl::getDeclName(), and clang::Decl::getLocation().
Referenced by clang::Sema::CheckInheritingConstructorUsingDecl(), and getSourceRange().
NestedNameSpecifier* clang::UsingDecl::getQualifier | ( | ) | const [inline] |
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().
NestedNameSpecifierLoc clang::UsingDecl::getQualifierLoc | ( | ) | const [inline] |
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().
SourceLocation clang::UsingDecl::getUsingLoc | ( | ) | const [inline] |
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().
bool clang::UsingDecl::isAccessDeclaration | ( | ) | const [inline] |
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 UsingDecl::removeShadowDecl | ( | UsingShadowDecl * | S | ) |
Definition at line 2065 of file DeclCXX.cpp.
References clang::UsingShadowDecl::getUsingDecl(), S, shadow_begin(), and shadow_end().
Referenced by clang::Sema::HideUsingShadowDecl().
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().
void clang::UsingDecl::setUsingLoc | ( | SourceLocation | L | ) | [inline] |
Set the source location of the 'using' keyword.
Definition at line 2896 of file DeclCXX.h.
Referenced by clang::ASTDeclReader::VisitUsingDecl().
shadow_iterator clang::UsingDecl::shadow_begin | ( | ) | const [inline] |
Definition at line 2963 of file DeclCXX.h.
Referenced by addShadowDecl(), clang::CodeGen::CGDebugInfo::EmitUsingDecl(), clang::TreeTransform< Derived >::RebuildUnresolvedUsingType(), removeShadowDecl(), shadow_size(), and shadows().
shadow_iterator clang::UsingDecl::shadow_end | ( | ) | const [inline] |
Definition at line 2966 of file DeclCXX.h.
Referenced by addShadowDecl(), clang::TreeTransform< Derived >::RebuildUnresolvedUsingType(), removeShadowDecl(), shadow_size(), and shadows().
unsigned clang::UsingDecl::shadow_size | ( | ) | const [inline] |
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().
shadow_range clang::UsingDecl::shadows | ( | ) | const [inline] |
Definition at line 2960 of file DeclCXX.h.
References shadow_begin(), and shadow_end().
friend class ASTDeclReader [friend] |
Reimplemented from clang::Decl.
friend class ASTDeclWriter [friend] |
Reimplemented from clang::Decl.