class BlockDecl::Capture

Declaration

class BlockDecl::Capture { /* full declaration omitted */ };

Description

A class which contains all the information about a particular captured value.

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

Member Variables

private llvm::PointerIntPair<VarDecl*, 2> VariableAndFlags
The variable being captured.
private clang::Expr* CopyExpr
The copy expression, expressed in terms of a DeclRef (or BlockDeclRef) to the captured variable. Only required if the variable has a C++ class type.

Method Overview

Methods

Capture(clang::VarDecl* variable,
        bool byRef,
        bool nested,
        clang::Expr* copy)

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

Parameters

clang::VarDecl* variable
bool byRef
bool nested
clang::Expr* copy

clang::Expr* getCopyExpr() const

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

clang::VarDecl* getVariable() const

Description

The variable being captured.

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

bool hasCopyExpr() const

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

bool isByRef() const

Description

Whether this is a "by ref" capture, i.e. a capture of a __block variable.

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

bool isEscapingByref() const

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

bool isNested() const

Description

Whether this is a nested capture, i.e. the variable captured is not from outside the immediately enclosing function/block.

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

bool isNonEscapingByref() const

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

void setCopyExpr(clang::Expr* e)

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

Parameters

clang::Expr* e