clang API Documentation

Public Member Functions | Static Public Member Functions | Friends
clang::UsingDirectiveDecl Class Reference

Represents C++ using-directive. More...

#include <DeclCXX.h>

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

List of all members.

Public Member Functions

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.
NamedDeclgetNominatedNamespaceAsWritten ()
const NamedDeclgetNominatedNamespaceAsWritten () const
NamespaceDeclgetNominatedNamespace ()
 Returns the namespace nominated by this using-directive.
const NamespaceDeclgetNominatedNamespace () const
DeclContextgetCommonAncestor ()
 Returns the common ancestor context of this using-directive and its nominated namespace.
const DeclContextgetCommonAncestor () const
SourceLocation getUsingLoc () const
 Return the location of the using keyword.
SourceLocation getNamespaceKeyLocation () const
 Returns the location of the namespace keyword.
SourceLocation getIdentLocation () const
 Returns the location of this using declaration's identifier.
SourceRange getSourceRange () const override LLVM_READONLY
 Source range that this declaration covers.

Static Public Member Functions

static UsingDirectiveDeclCreate (ASTContext &C, DeclContext *DC, SourceLocation UsingLoc, SourceLocation NamespaceLoc, NestedNameSpecifierLoc QualifierLoc, SourceLocation IdentLoc, NamedDecl *Nominated, DeclContext *CommonAncestor)
static UsingDirectiveDeclCreateDeserialized (ASTContext &C, unsigned ID)
static bool classof (const Decl *D)
static bool classofKind (Kind K)

Friends

class DeclContext
class ASTDeclReader

Detailed Description

Represents C++ using-directive.

For example:

    using namespace std;
Note:
UsingDirectiveDecl should be Decl not NamedDecl, but we provide artificial names for all using-directives in order to store them in DeclContext effectively.

Definition at line 2551 of file DeclCXX.h.


Member Function Documentation

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

Reimplemented from clang::NamedDecl.

Definition at line 2638 of file DeclCXX.h.

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

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

Reimplemented from clang::NamedDecl.

Definition at line 2639 of file DeclCXX.h.

Referenced by classof().

UsingDirectiveDecl * UsingDirectiveDecl::Create ( ASTContext C,
DeclContext DC,
SourceLocation  UsingLoc,
SourceLocation  NamespaceLoc,
NestedNameSpecifierLoc  QualifierLoc,
SourceLocation  IdentLoc,
NamedDecl Nominated,
DeclContext CommonAncestor 
) [static]

Definition at line 1953 of file DeclCXX.cpp.

References AttributeLangSupport::C.

Returns the common ancestor context of this using-directive and its nominated namespace.

Definition at line 2612 of file DeclCXX.h.

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

Definition at line 2613 of file DeclCXX.h.

Returns the location of this using declaration's identifier.

Definition at line 2623 of file DeclCXX.h.

References clang::Decl::getLocation().

Returns the location of the namespace keyword.

Definition at line 2620 of file DeclCXX.h.

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

Returns the namespace nominated by this using-directive.

Definition at line 1961 of file DeclCXX.cpp.

Referenced by clang::CodeGen::CGDebugInfo::EmitUsingDirective(), getNominatedNamespace(), and clang::ASTDeclWriter::VisitUsingDirectiveDecl().

Definition at line 2606 of file DeclCXX.h.

References getNominatedNamespace().

Definition at line 2598 of file DeclCXX.h.

Definition at line 2599 of file DeclCXX.h.

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

Definition at line 2594 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 2590 of file DeclCXX.h.

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

SourceRange clang::UsingDirectiveDecl::getSourceRange ( ) const [inline, override, virtual]

Source range that this declaration covers.

Reimplemented from clang::Decl.

Definition at line 2634 of file DeclCXX.h.

References clang::Decl::getLocation().

Return the location of the using keyword.

Definition at line 2616 of file DeclCXX.h.

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


Friends And Related Function Documentation

friend class ASTDeclReader [friend]

Reimplemented from clang::Decl.

Definition at line 2644 of file DeclCXX.h.

friend class DeclContext [friend]

Reimplemented from clang::Decl.

Definition at line 2642 of file DeclCXX.h.


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