clang API Documentation
Represents C++ using-directive. More...
#include <DeclCXX.h>
Public Member Functions | |
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. | |
NamedDecl * | getNominatedNamespaceAsWritten () |
const NamedDecl * | getNominatedNamespaceAsWritten () const |
NamespaceDecl * | getNominatedNamespace () |
Returns the namespace nominated by this using-directive. | |
const NamespaceDecl * | getNominatedNamespace () const |
DeclContext * | getCommonAncestor () |
Returns the common ancestor context of this using-directive and its nominated namespace. | |
const DeclContext * | getCommonAncestor () 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 UsingDirectiveDecl * | Create (ASTContext &C, DeclContext *DC, SourceLocation UsingLoc, SourceLocation NamespaceLoc, NestedNameSpecifierLoc QualifierLoc, SourceLocation IdentLoc, NamedDecl *Nominated, DeclContext *CommonAncestor) |
static UsingDirectiveDecl * | CreateDeserialized (ASTContext &C, unsigned ID) |
static bool | classof (const Decl *D) |
static bool | classofKind (Kind K) |
Friends | |
class | DeclContext |
class | ASTDeclReader |
Represents C++ using-directive.
For example:
using namespace std;
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 1940 of file DeclCXX.cpp.
References AttributeLangSupport::C.
Referenced by clang::Sema::ActOnStartNamespaceDef(), and clang::Sema::ActOnUsingDirective().
UsingDirectiveDecl * UsingDirectiveDecl::CreateDeserialized | ( | ASTContext & | C, |
unsigned | ID | ||
) | [static] |
Definition at line 1953 of file DeclCXX.cpp.
References AttributeLangSupport::C.
DeclContext* clang::UsingDirectiveDecl::getCommonAncestor | ( | ) | [inline] |
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().
const DeclContext* clang::UsingDirectiveDecl::getCommonAncestor | ( | ) | const [inline] |
SourceLocation clang::UsingDirectiveDecl::getIdentLocation | ( | ) | const [inline] |
Returns the location of this using declaration's identifier.
Definition at line 2623 of file DeclCXX.h.
References clang::Decl::getLocation().
SourceLocation clang::UsingDirectiveDecl::getNamespaceKeyLocation | ( | ) | const [inline] |
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().
const NamespaceDecl* clang::UsingDirectiveDecl::getNominatedNamespace | ( | ) | const [inline] |
Definition at line 2606 of file DeclCXX.h.
References getNominatedNamespace().
const NamedDecl* clang::UsingDirectiveDecl::getNominatedNamespaceAsWritten | ( | ) | const [inline] |
NestedNameSpecifier* clang::UsingDirectiveDecl::getQualifier | ( | ) | const [inline] |
Retrieve the nested-name-specifier that qualifies the name of the namespace.
Definition at line 2594 of file DeclCXX.h.
References clang::NestedNameSpecifierLoc::getNestedNameSpecifier().
NestedNameSpecifierLoc clang::UsingDirectiveDecl::getQualifierLoc | ( | ) | const [inline] |
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().
SourceLocation clang::UsingDirectiveDecl::getUsingLoc | ( | ) | const [inline] |
Return the location of the using
keyword.
Definition at line 2616 of file DeclCXX.h.
Referenced by clang::ASTDeclWriter::VisitUsingDirectiveDecl().
friend class ASTDeclReader [friend] |
Reimplemented from clang::Decl.
friend class DeclContext [friend] |
Reimplemented from clang::Decl.