class UsingDecl

Declaration

class UsingDecl : public BaseUsingDecl, public Mergeable { /* full declaration omitted */ };

Description

Represents a C++ using-declaration. For example:

Declared at: clang/include/clang/AST/DeclCXX.h:3412

Inherits from: BaseUsingDecl, Mergeable

Member Variables

private clang::SourceLocation UsingLocation
The source location of the 'using' keyword itself.
private clang::NestedNameSpecifierLoc QualifierLoc
The nested-name-specifier that precedes the name.
private clang::DeclarationNameLoc DNLoc
Provides source/type location info for the declaration name embedded in the ValueDecl base class.

Inherited from Decl:

protected NextInContextAndBits
protected Access
protected FromASTFile
protected IdentifierNamespace
protected CacheValidAndLinkage

Method Overview

  • public static clang::UsingDecl * Create(clang::ASTContext & C, clang::DeclContext * DC, clang::SourceLocation UsingL, clang::NestedNameSpecifierLoc QualifierLoc, const clang::DeclarationNameInfo & NameInfo, bool HasTypenameKeyword)
  • public static clang::UsingDecl * CreateDeserialized(clang::ASTContext & C, unsigned int ID)
  • private UsingDecl(clang::DeclContext * DC, clang::SourceLocation UL, clang::NestedNameSpecifierLoc QualifierLoc, const clang::DeclarationNameInfo & NameInfo, bool HasTypenameKeyword)
  • private void anchor()
  • public static bool classof(const clang::Decl * D)
  • public static bool classofKind(clang::Decl::Kind K)
  • public clang::UsingDecl * getCanonicalDecl()
  • public const clang::UsingDecl * getCanonicalDecl() const
  • public clang::DeclarationNameInfo getNameInfo() const
  • public clang::NestedNameSpecifier * getQualifier() const
  • public clang::NestedNameSpecifierLoc getQualifierLoc() const
  • public clang::SourceRange getSourceRange() const
  • public clang::SourceLocation getUsingLoc() const
  • public bool hasTypename() const
  • public bool isAccessDeclaration() const
  • public void setTypename(bool TN)
  • public void setUsingLoc(clang::SourceLocation L)

Inherited from BaseUsingDecl:

Inherited from NamedDecl:

Inherited from Decl:

Methods

static clang::UsingDecl* Create(
    clang::ASTContext& C,
    clang::DeclContext* DC,
    clang::SourceLocation UsingL,
    clang::NestedNameSpecifierLoc QualifierLoc,
    const clang::DeclarationNameInfo& NameInfo,
    bool HasTypenameKeyword)

Declared at: clang/include/clang/AST/DeclCXX.h:3466

Parameters

clang::ASTContext& C
clang::DeclContext* DC
clang::SourceLocation UsingL
clang::NestedNameSpecifierLoc QualifierLoc
const clang::DeclarationNameInfo& NameInfo
bool HasTypenameKeyword

static clang::UsingDecl* CreateDeserialized(
    clang::ASTContext& C,
    unsigned int ID)

Declared at: clang/include/clang/AST/DeclCXX.h:3472

Parameters

clang::ASTContext& C
unsigned int ID

UsingDecl(
    clang::DeclContext* DC,
    clang::SourceLocation UL,
    clang::NestedNameSpecifierLoc QualifierLoc,
    const clang::DeclarationNameInfo& NameInfo,
    bool HasTypenameKeyword)

Declared at: clang/include/clang/AST/DeclCXX.h:3423

Parameters

clang::DeclContext* DC
clang::SourceLocation UL
clang::NestedNameSpecifierLoc QualifierLoc
const clang::DeclarationNameInfo& NameInfo
bool HasTypenameKeyword

void anchor()

Declared at: clang/include/clang/AST/DeclCXX.h:3432

static bool classof(const clang::Decl* D)

Declared at: clang/include/clang/AST/DeclCXX.h:3484

Parameters

const clang::Decl* D

static bool classofKind(clang::Decl::Kind K)

Declared at: clang/include/clang/AST/DeclCXX.h:3485

Parameters

clang::Decl::Kind K

clang::UsingDecl* getCanonicalDecl()

Description

Retrieves the canonical declaration of this declaration.

Declared at: clang/include/clang/AST/DeclCXX.h:3477

const clang::UsingDecl* getCanonicalDecl() const

Declared at: clang/include/clang/AST/DeclCXX.h:3480

clang::DeclarationNameInfo getNameInfo() const

Declared at: clang/include/clang/AST/DeclCXX.h:3453

clang::NestedNameSpecifier* getQualifier() const

Description

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

Declared at: clang/include/clang/AST/DeclCXX.h:3449

clang::NestedNameSpecifierLoc getQualifierLoc()
    const

Description

Retrieve the nested-name-specifier that qualifies the name, with source-location information.

Declared at: clang/include/clang/AST/DeclCXX.h:3446

clang::SourceRange getSourceRange() const

Description

Source range that this declaration covers.

Declared at: clang/include/clang/AST/DeclCXX.h:3474

clang::SourceLocation getUsingLoc() const

Description

Return the source location of the 'using' keyword.

Declared at: clang/include/clang/AST/DeclCXX.h:3439

bool hasTypename() const

Description

Return true if the using declaration has 'typename'.

Declared at: clang/include/clang/AST/DeclCXX.h:3461

bool isAccessDeclaration() const

Description

Return true if it is a C++03 access declaration (no 'using').

Declared at: clang/include/clang/AST/DeclCXX.h:3458

void setTypename(bool TN)

Description

Sets whether the using declaration has 'typename'.

Declared at: clang/include/clang/AST/DeclCXX.h:3464

Parameters

bool TN

void setUsingLoc(clang::SourceLocation L)

Description

Set the source location of the 'using' keyword.

Declared at: clang/include/clang/AST/DeclCXX.h:3442

Parameters

clang::SourceLocation L