class UsingPackDecl

Declaration

class UsingPackDecl : public NamedDecl,
                      public Mergeable,
                      private TrailingObjects { /* full declaration omitted */ };

Description

Represents a pack of using declarations that a single using-declarator pack-expanded into. In the second case above, the UsingPackDecl will have the name 'operator T' (which contains an unexpanded pack), but the individual UsingDecls and UsingShadowDecls will have more reasonable names.

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

Inherits from: NamedDecl, Mergeable, TrailingObjects

Member Variables

private clang::NamedDecl* InstantiatedFrom
The UnresolvedUsingValueDecl or UnresolvedUsingTypenameDecl from which this waas instantiated.
private unsigned int NumExpansions
The number of using-declarations created by this pack expansion.

Inherited from Decl:

protected NextInContextAndBits
protected Access
protected FromASTFile
protected IdentifierNamespace
protected CacheValidAndLinkage

Method Overview

  • public static clang::UsingPackDecl * Create(clang::ASTContext & C, clang::DeclContext * DC, clang::NamedDecl * InstantiatedFrom, ArrayRef<clang::NamedDecl *> UsingDecls)
  • public static clang::UsingPackDecl * CreateDeserialized(clang::ASTContext & C, unsigned int ID, unsigned int NumExpansions)
  • private UsingPackDecl(clang::DeclContext * DC, clang::NamedDecl * InstantiatedFrom, ArrayRef<clang::NamedDecl *> UsingDecls)
  • private void anchor()
  • public static bool classof(const clang::Decl * D)
  • public static bool classofKind(clang::Decl::Kind K)
  • public ArrayRef<clang::NamedDecl *> expansions() const
  • public clang::UsingPackDecl * getCanonicalDecl()
  • public const clang::UsingPackDecl * getCanonicalDecl() const
  • public clang::NamedDecl * getInstantiatedFromUsingDecl() const
  • public clang::SourceRange getSourceRange() const

Inherited from NamedDecl:

Inherited from Decl:

Methods

static clang::UsingPackDecl* Create(
    clang::ASTContext& C,
    clang::DeclContext* DC,
    clang::NamedDecl* InstantiatedFrom,
    ArrayRef<clang::NamedDecl*> UsingDecls)

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

Parameters

clang::ASTContext& C
clang::DeclContext* DC
clang::NamedDecl* InstantiatedFrom
ArrayRef<clang::NamedDecl*> UsingDecls

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

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

Parameters

clang::ASTContext& C
unsigned int ID
unsigned int NumExpansions

UsingPackDecl(
    clang::DeclContext* DC,
    clang::NamedDecl* InstantiatedFrom,
    ArrayRef<clang::NamedDecl*> UsingDecls)

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

Parameters

clang::DeclContext* DC
clang::NamedDecl* InstantiatedFrom
ArrayRef<clang::NamedDecl*> UsingDecls

void anchor()

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

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

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

Parameters

const clang::Decl* D

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

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

Parameters

clang::Decl::Kind K

ArrayRef<clang::NamedDecl*> expansions() const

Description

Get the set of using declarations that this pack expanded into. Note that some of these may still be unresolved.

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

clang::UsingPackDecl* getCanonicalDecl()

Description

Retrieves the "canonical" declaration of the given declaration.

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

const clang::UsingPackDecl* getCanonicalDecl()
    const

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

clang::NamedDecl* getInstantiatedFromUsingDecl()
    const

Description

Get the using declaration from which this was instantiated. This will always be an UnresolvedUsingValueDecl or an UnresolvedUsingTypenameDecl that is a pack expansion.

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

clang::SourceRange getSourceRange() const

Description

Source range that this declaration covers.

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