clang API Documentation

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

Represents a C++ namespace alias. More...

#include <DeclCXX.h>

Inheritance diagram for clang::NamespaceAliasDecl:
Inheritance graph
[legend]
Collaboration diagram for clang::NamespaceAliasDecl:
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

NamespaceAliasDeclgetCanonicalDecl () override
 Retrieves the "canonical" declaration of the given declaration.
const NamespaceAliasDeclgetCanonicalDecl () const
NestedNameSpecifierLoc getQualifierLoc () const
 Retrieve the nested-name-specifier that qualifies the name of the namespace, with source-location information.
NestedNameSpecifiergetQualifier () const
 Retrieve the nested-name-specifier that qualifies the name of the namespace.
NamespaceDeclgetNamespace ()
 Retrieve the namespace declaration aliased by this directive.
const NamespaceDeclgetNamespace () 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.
NamedDeclgetAliasedNamespace () 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 NamespaceAliasDeclCreate (ASTContext &C, DeclContext *DC, SourceLocation NamespaceLoc, SourceLocation AliasLoc, IdentifierInfo *Alias, NestedNameSpecifierLoc QualifierLoc, SourceLocation IdentLoc, NamedDecl *Namespace)
static NamespaceAliasDeclCreateDeserialized (ASTContext &C, unsigned ID)
static bool classof (const Decl *D)
static bool classofKind (Kind K)

Friends

class ASTDeclReader

Detailed Description

Represents a C++ namespace alias.

For example:

 namespace Foo = Bar;

Definition at line 2654 of file DeclCXX.h.


Member Typedef Documentation

typedef redeclarable_base::redecl_iterator clang::NamespaceAliasDecl::redecl_iterator

Definition at line 2700 of file DeclCXX.h.

Reimplemented from clang::Redeclarable< NamespaceAliasDecl >.

Definition at line 2699 of file DeclCXX.h.


Member Function Documentation

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().

Definition at line 2030 of file DeclCXX.cpp.

References AttributeLangSupport::C.

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().

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().

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().

Reimplemented from clang::Decl.

Definition at line 2710 of file DeclCXX.h.

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

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().

Definition at line 2732 of file DeclCXX.h.

References getNamespace().

Returns the location of the namespace keyword.

Definition at line 2741 of file DeclCXX.h.

Referenced by clang::ASTDeclWriter::VisitNamespaceAliasDecl().

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

Definition at line 2720 of file DeclCXX.h.

References clang::NestedNameSpecifierLoc::getNestedNameSpecifier().

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.

Definition at line 2750 of file DeclCXX.h.

Returns the location of the identifier in the named namespace.

Definition at line 2744 of file DeclCXX.h.

Referenced by clang::ASTDeclWriter::VisitNamespaceAliasDecl().


Friends And Related Function Documentation

friend class ASTDeclReader [friend]

Reimplemented from clang::Redeclarable< NamespaceAliasDecl >.

Definition at line 2686 of file DeclCXX.h.


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