class DecompositionDecl

Declaration

class DecompositionDecl : public VarDecl, private TrailingObjects { /* full declaration omitted */ };

Description

A decomposition declaration. For instance, given: int n[3]; auto & [a, b, c] = n; the second line declares a DecompositionDecl of type 'int ( & )[3]', and three BindingDecls (named a, b, and c). An instance of this class is always unnamed, but behaves in almost all other respects like a VarDecl.

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

Inherits from: VarDecl, TrailingObjects

Member Variables

private unsigned int NumBindings
The number of BindingDecl*s following this object.

Inherited from VarDecl:

protected Init
protected

Inherited from Decl:

protected NextInContextAndBits
protected Access
protected FromASTFile
protected IdentifierNamespace
protected CacheValidAndLinkage

Method Overview

  • public static clang::DecompositionDecl * Create(clang::ASTContext & C, clang::DeclContext * DC, clang::SourceLocation StartLoc, clang::SourceLocation LSquareLoc, clang::QualType T, clang::TypeSourceInfo * TInfo, clang::StorageClass S, ArrayRef<clang::BindingDecl *> Bindings)
  • public static clang::DecompositionDecl * CreateDeserialized(clang::ASTContext & C, unsigned int ID, unsigned int NumBindings)
  • private DecompositionDecl(clang::ASTContext & C, clang::DeclContext * DC, clang::SourceLocation StartLoc, clang::SourceLocation LSquareLoc, clang::QualType T, clang::TypeSourceInfo * TInfo, clang::StorageClass SC, ArrayRef<clang::BindingDecl *> Bindings)
  • private void anchor()
  • public ArrayRef<clang::BindingDecl *> bindings() const
  • public static bool classof(const clang::Decl * D)
  • public static bool classofKind(clang::Decl::Kind K)
  • public void printName(llvm::raw_ostream & os) const

Inherited from VarDecl:

Inherited from DeclaratorDecl:

Inherited from ValueDecl:

Inherited from NamedDecl:

Inherited from Decl:

Methods

static clang::DecompositionDecl* Create(
    clang::ASTContext& C,
    clang::DeclContext* DC,
    clang::SourceLocation StartLoc,
    clang::SourceLocation LSquareLoc,
    clang::QualType T,
    clang::TypeSourceInfo* TInfo,
    clang::StorageClass S,
    ArrayRef<clang::BindingDecl*> Bindings)

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

Parameters

clang::ASTContext& C
clang::DeclContext* DC
clang::SourceLocation StartLoc
clang::SourceLocation LSquareLoc
clang::QualType T
clang::TypeSourceInfo* TInfo
clang::StorageClass S
ArrayRef<clang::BindingDecl*> Bindings

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

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

Parameters

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

DecompositionDecl(
    clang::ASTContext& C,
    clang::DeclContext* DC,
    clang::SourceLocation StartLoc,
    clang::SourceLocation LSquareLoc,
    clang::QualType T,
    clang::TypeSourceInfo* TInfo,
    clang::StorageClass SC,
    ArrayRef<clang::BindingDecl*> Bindings)

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

Parameters

clang::ASTContext& C
clang::DeclContext* DC
clang::SourceLocation StartLoc
clang::SourceLocation LSquareLoc
clang::QualType T
clang::TypeSourceInfo* TInfo
clang::StorageClass SC
ArrayRef<clang::BindingDecl*> Bindings

void anchor()

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

ArrayRef<clang::BindingDecl*> bindings() const

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

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

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

Parameters

const clang::Decl* D

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

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

Parameters

clang::Decl::Kind K

void printName(llvm::raw_ostream& os) const

Description

Pretty-print the unqualified name of this declaration. Can be overloaded by derived classes to provide a more user-friendly name when appropriate.

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

Parameters

llvm::raw_ostream& os