clang API Documentation
Represents a C++ namespace alias. More...
#include <DeclCXX.h>


Public Types | |
| typedef redeclarable_base::redecl_range | redecl_range |
| typedef redeclarable_base::redecl_iterator | redecl_iterator |
Public Member Functions | |
| NamespaceAliasDecl * | getCanonicalDecl () override |
| Retrieves the "canonical" declaration of the given declaration. | |
| const NamespaceAliasDecl * | getCanonicalDecl () const |
| NestedNameSpecifierLoc | getQualifierLoc () const |
| Retrieve the nested-name-specifier that qualifies the name of the namespace, with source-location information. | |
| NestedNameSpecifier * | getQualifier () const |
| Retrieve the nested-name-specifier that qualifies the name of the namespace. | |
| NamespaceDecl * | getNamespace () |
| Retrieve the namespace declaration aliased by this directive. | |
| const NamespaceDecl * | getNamespace () const |
| SourceLocation | getAliasLoc () const |
| SourceLocation | getNamespaceLoc () const |
Returns the location of the namespace keyword. | |
| SourceLocation | getTargetNameLoc () const |
| Returns the location of the identifier in the named namespace. | |
| NamedDecl * | getAliasedNamespace () const |
| Retrieve the namespace that this alias refers to, which may either be a NamespaceDecl or a NamespaceAliasDecl. | |
| SourceRange | getSourceRange () const override LLVM_READONLY |
| Source range that this declaration covers. | |
Static Public Member Functions | |
| static NamespaceAliasDecl * | Create (ASTContext &C, DeclContext *DC, SourceLocation NamespaceLoc, SourceLocation AliasLoc, IdentifierInfo *Alias, NestedNameSpecifierLoc QualifierLoc, SourceLocation IdentLoc, NamedDecl *Namespace) |
| static NamespaceAliasDecl * | CreateDeserialized (ASTContext &C, unsigned ID) |
| static bool | classof (const Decl *D) |
| static bool | classofKind (Kind K) |
Friends | |
| class | ASTDeclReader |
Represents a C++ namespace alias.
For example:
namespace Foo = Bar;
| typedef redeclarable_base::redecl_iterator clang::NamespaceAliasDecl::redecl_iterator |
Reimplemented from clang::Redeclarable< NamespaceAliasDecl >.
| static bool clang::NamespaceAliasDecl::classof | ( | const Decl * | D | ) | [inline, static] |
Reimplemented from clang::NamedDecl.
Definition at line 2754 of file DeclCXX.h.
References classofKind(), and clang::Decl::getKind().
| static bool clang::NamespaceAliasDecl::classofKind | ( | Kind | K | ) | [inline, static] |
Reimplemented from clang::NamedDecl.
Definition at line 2755 of file DeclCXX.h.
Referenced by classof().
| NamespaceAliasDecl * NamespaceAliasDecl::Create | ( | ASTContext & | C, |
| DeclContext * | DC, | ||
| SourceLocation | NamespaceLoc, | ||
| SourceLocation | AliasLoc, | ||
| IdentifierInfo * | Alias, | ||
| NestedNameSpecifierLoc | QualifierLoc, | ||
| SourceLocation | IdentLoc, | ||
| NamedDecl * | Namespace | ||
| ) | [static] |
Definition at line 2015 of file DeclCXX.cpp.
References AttributeLangSupport::C.
Referenced by clang::Sema::ActOnNamespaceAliasDef().
| NamespaceAliasDecl * NamespaceAliasDecl::CreateDeserialized | ( | ASTContext & | C, |
| unsigned | ID | ||
| ) | [static] |
Definition at line 2030 of file DeclCXX.cpp.
References AttributeLangSupport::C.
| NamedDecl* clang::NamespaceAliasDecl::getAliasedNamespace | ( | ) | const [inline] |
Retrieve the namespace that this alias refers to, which may either be a NamespaceDecl or a NamespaceAliasDecl.
Definition at line 2748 of file DeclCXX.h.
Referenced by clang::CodeGen::CGDebugInfo::EmitNamespaceAlias().
| SourceLocation clang::NamespaceAliasDecl::getAliasLoc | ( | ) | const [inline] |
Returns the location of the alias name, i.e. 'foo' in "namespace foo = ns::bar;".
Definition at line 2738 of file DeclCXX.h.
References clang::Decl::getLocation().
| NamespaceAliasDecl* clang::NamespaceAliasDecl::getCanonicalDecl | ( | ) | [inline, override, virtual] |
Retrieves the "canonical" declaration of the given declaration.
Reimplemented from clang::Decl.
Definition at line 2707 of file DeclCXX.h.
References clang::Redeclarable< NamespaceAliasDecl >::getFirstDecl().
| const NamespaceAliasDecl* clang::NamespaceAliasDecl::getCanonicalDecl | ( | ) | const [inline] |
Reimplemented from clang::Decl.
Definition at line 2710 of file DeclCXX.h.
References clang::Redeclarable< NamespaceAliasDecl >::getFirstDecl().
| NamespaceDecl* clang::NamespaceAliasDecl::getNamespace | ( | ) | [inline] |
Retrieve the namespace declaration aliased by this directive.
Definition at line 2725 of file DeclCXX.h.
Referenced by clang::Sema::computeDeclContext(), clang::ASTContext::getCanonicalNestedNameSpecifier(), getNamespace(), and clang::ASTDeclWriter::VisitNamespaceAliasDecl().
| const NamespaceDecl* clang::NamespaceAliasDecl::getNamespace | ( | ) | const [inline] |
Definition at line 2732 of file DeclCXX.h.
References getNamespace().
| SourceLocation clang::NamespaceAliasDecl::getNamespaceLoc | ( | ) | const [inline] |
Returns the location of the namespace keyword.
Definition at line 2741 of file DeclCXX.h.
Referenced by clang::ASTDeclWriter::VisitNamespaceAliasDecl().
| NestedNameSpecifier* clang::NamespaceAliasDecl::getQualifier | ( | ) | const [inline] |
Retrieve the nested-name-specifier that qualifies the name of the namespace.
Definition at line 2720 of file DeclCXX.h.
References clang::NestedNameSpecifierLoc::getNestedNameSpecifier().
| NestedNameSpecifierLoc clang::NamespaceAliasDecl::getQualifierLoc | ( | ) | const [inline] |
Retrieve the nested-name-specifier that qualifies the name of the namespace, with source-location information.
Definition at line 2716 of file DeclCXX.h.
Referenced by clang::ASTDeclWriter::VisitNamespaceAliasDecl().
| SourceRange clang::NamespaceAliasDecl::getSourceRange | ( | ) | const [inline, override, virtual] |
Source range that this declaration covers.
Reimplemented from clang::Decl.
| SourceLocation clang::NamespaceAliasDecl::getTargetNameLoc | ( | ) | const [inline] |
Returns the location of the identifier in the named namespace.
Definition at line 2744 of file DeclCXX.h.
Referenced by clang::ASTDeclWriter::VisitNamespaceAliasDecl().
friend class ASTDeclReader [friend] |
Reimplemented from clang::Redeclarable< NamespaceAliasDecl >.