class CapturedDecl

Declaration

class CapturedDecl : public Decl,
                     public DeclContext,
                     private TrailingObjects { /* full declaration omitted */ };

Description

Represents the body of a CapturedStmt, and serves as its DeclContext.

Declared at: clang/include/clang/AST/Decl.h:4408

Inherits from: Decl, DeclContext, TrailingObjects

Member Variables

private unsigned int NumParams
The number of parameters to the outlined function.
private unsigned int ContextParam
The position of context parameter in list of parameters.
private llvm::PointerIntPair<Stmt*, 1, bool> BodyAndNothrow
The body of the outlined function.

Inherited from DeclContext:

protected
protected FirstDecl = nullptr
protected LastDecl = nullptr

Inherited from Decl:

protected NextInContextAndBits
protected Access
protected FromASTFile
protected IdentifierNamespace
protected CacheValidAndLinkage

Method Overview

  • private CapturedDecl(clang::DeclContext * DC, unsigned int NumParams)
  • public static clang::CapturedDecl * Create(clang::ASTContext & C, clang::DeclContext * DC, unsigned int NumParams)
  • public static clang::CapturedDecl * CreateDeserialized(clang::ASTContext & C, unsigned int ID, unsigned int NumParams)
  • public static clang::CapturedDecl * castFromDeclContext(const clang::DeclContext * DC)
  • public static clang::DeclContext * castToDeclContext(const clang::CapturedDecl * D)
  • public static bool classof(const clang::Decl * D)
  • public static bool classofKind(clang::Decl::Kind K)
  • public clang::Stmt * getBody() const
  • public clang::ImplicitParamDecl * getContextParam() const
  • public unsigned int getContextParamPosition() const
  • public unsigned int getNumParams() const
  • public clang::ImplicitParamDecl * getParam(unsigned int i) const
  • private clang::ImplicitParamDecl *const * getParams() const
  • private clang::ImplicitParamDecl ** getParams()
  • public bool isNothrow() const
  • protected size_t numTrailingObjects(OverloadToken<clang::ImplicitParamDecl>)
  • public clang::CapturedDecl::param_iterator param_begin() const
  • public clang::CapturedDecl::param_iterator param_end() const
  • public MutableArrayRef<clang::ImplicitParamDecl *> parameters()
  • public ArrayRef<clang::ImplicitParamDecl *> parameters() const
  • public void setBody(clang::Stmt * B)
  • public void setContextParam(unsigned int i, clang::ImplicitParamDecl * P)
  • public void setNothrow(bool Nothrow = true)
  • public void setParam(unsigned int i, clang::ImplicitParamDecl * P)

Inherited from DeclContext:

Inherited from Decl:

Methods

CapturedDecl(clang::DeclContext* DC,
             unsigned int NumParams)

Declared at: clang/include/clang/AST/Decl.h:4427

Parameters

clang::DeclContext* DC
unsigned int NumParams

static clang::CapturedDecl* Create(
    clang::ASTContext& C,
    clang::DeclContext* DC,
    unsigned int NumParams)

Declared at: clang/include/clang/AST/Decl.h:4442

Parameters

clang::ASTContext& C
clang::DeclContext* DC
unsigned int NumParams

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

Declared at: clang/include/clang/AST/Decl.h:4444

Parameters

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

static clang::CapturedDecl* castFromDeclContext(
    const clang::DeclContext* DC)

Declared at: clang/include/clang/AST/Decl.h:4498

Parameters

const clang::DeclContext* DC

static clang::DeclContext* castToDeclContext(
    const clang::CapturedDecl* D)

Declared at: clang/include/clang/AST/Decl.h:4495

Parameters

const clang::CapturedDecl* D

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

Declared at: clang/include/clang/AST/Decl.h:4493

Parameters

const clang::Decl* D

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

Declared at: clang/include/clang/AST/Decl.h:4494

Parameters

clang::Decl::Kind K

clang::Stmt* getBody() const

Description

getBody - If this Decl represents a declaration for a body of code, such as a function or method definition, this method returns the top-level Stmt* of that body. Otherwise this method returns null.

Declared at: clang/include/clang/AST/Decl.h:4447

clang::ImplicitParamDecl* getContextParam() const

Description

Retrieve the parameter containing captured variables.

Declared at: clang/include/clang/AST/Decl.h:4473

unsigned int getContextParamPosition() const

Declared at: clang/include/clang/AST/Decl.h:4482

unsigned int getNumParams() const

Declared at: clang/include/clang/AST/Decl.h:4453

clang::ImplicitParamDecl* getParam(
    unsigned int i) const

Declared at: clang/include/clang/AST/Decl.h:4455

Parameters

unsigned int i

clang::ImplicitParamDecl* const* getParams() const

Declared at: clang/include/clang/AST/Decl.h:4429

clang::ImplicitParamDecl** getParams()

Declared at: clang/include/clang/AST/Decl.h:4433

bool isNothrow() const

Declared at: clang/include/clang/AST/Decl.h:4450

size_t numTrailingObjects(
    OverloadToken<clang::ImplicitParamDecl>)

Declared at: clang/include/clang/AST/Decl.h:4413

Parameters

OverloadToken<clang::ImplicitParamDecl>

clang::CapturedDecl::param_iterator param_begin()
    const

Description

Retrieve an iterator pointing to the first parameter decl.

Declared at: clang/include/clang/AST/Decl.h:4488

clang::CapturedDecl::param_iterator param_end()
    const

Description

Retrieve an iterator one past the last parameter decl.

Declared at: clang/include/clang/AST/Decl.h:4490

MutableArrayRef<clang::ImplicitParamDecl*>
parameters()

Declared at: clang/include/clang/AST/Decl.h:4468

ArrayRef<clang::ImplicitParamDecl*> parameters()
    const

Declared at: clang/include/clang/AST/Decl.h:4465

void setBody(clang::Stmt* B)

Declared at: clang/include/clang/AST/Decl.h:4448

Parameters

clang::Stmt* B

void setContextParam(unsigned int i,
                     clang::ImplicitParamDecl* P)

Declared at: clang/include/clang/AST/Decl.h:4477

Parameters

unsigned int i
clang::ImplicitParamDecl* P

void setNothrow(bool Nothrow = true)

Declared at: clang/include/clang/AST/Decl.h:4451

Parameters

bool Nothrow = true

void setParam(unsigned int i,
              clang::ImplicitParamDecl* P)

Declared at: clang/include/clang/AST/Decl.h:4459

Parameters

unsigned int i
clang::ImplicitParamDecl* P