class CapturedStmt

Declaration

class CapturedStmt : public Stmt { /* full declaration omitted */ };

Description

This captures a statement into a function. For example, the following pragma annotated compound statement can be represented as a CapturedStmt, and this compound statement is the body of an anonymous outlined function.

Declared at: clang/include/clang/AST/Stmt.h:3532

Inherits from: Stmt

Member Variables

private unsigned int NumCaptures
The number of variable captured, including 'this'.
private llvm::PointerIntPair<CapturedDecl*, 2, CapturedRegionKind> CapDeclAndKind
The pointer part is the implicit the outlined function and the int part is the captured region kind, 'CR_Default' etc.
private clang::RecordDecl* TheRecordDecl = nullptr
The record for captured variables, a RecordDecl or CXXRecordDecl.

Inherited from Stmt:

protected

Method Overview

Inherited from Stmt:

Methods

CapturedStmt(clang::Stmt::EmptyShell Empty,
             unsigned int NumCaptures)

Description

Construct an empty captured statement.

Declared at: clang/include/clang/AST/Stmt.h:3608

Parameters

clang::Stmt::EmptyShell Empty
unsigned int NumCaptures

CapturedStmt(
    clang::Stmt* S,
    clang::CapturedRegionKind Kind,
    ArrayRef<clang::CapturedStmt::Capture>
        Captures,
    ArrayRef<clang::Expr*> CaptureInits,
    clang::CapturedDecl* CD,
    clang::RecordDecl* RD)

Description

Construct a captured statement.

Declared at: clang/include/clang/AST/Stmt.h:3604

Parameters

clang::Stmt* S
clang::CapturedRegionKind Kind
ArrayRef<clang::CapturedStmt::Capture> Captures
ArrayRef<clang::Expr*> CaptureInits
clang::CapturedDecl* CD
clang::RecordDecl* RD

static clang::CapturedStmt* Create(
    const clang::ASTContext& Context,
    clang::Stmt* S,
    clang::CapturedRegionKind Kind,
    ArrayRef<clang::CapturedStmt::Capture>
        Captures,
    ArrayRef<clang::Expr*> CaptureInits,
    clang::CapturedDecl* CD,
    clang::RecordDecl* RD)

Declared at: clang/include/clang/AST/Stmt.h:3623

Parameters

const clang::ASTContext& Context
clang::Stmt* S
clang::CapturedRegionKind Kind
ArrayRef<clang::CapturedStmt::Capture> Captures
ArrayRef<clang::Expr*> CaptureInits
clang::CapturedDecl* CD
clang::RecordDecl* RD

static clang::CapturedStmt* CreateDeserialized(
    const clang::ASTContext& Context,
    unsigned int NumCaptures)

Declared at: clang/include/clang/AST/Stmt.h:3629

Parameters

const clang::ASTContext& Context
unsigned int NumCaptures

clang::CapturedStmt::const_capture_iterator
capture_begin() const

Declared at: clang/include/clang/AST/Stmt.h:3676

clang::CapturedStmt::capture_iterator
capture_begin()

Description

Retrieve an iterator pointing to the first capture.

Declared at: clang/include/clang/AST/Stmt.h:3675

clang::CapturedStmt::capture_iterator
capture_end() const

Description

Retrieve an iterator pointing past the end of the sequence of captures.

Declared at: clang/include/clang/AST/Stmt.h:3680

clang::CapturedStmt::const_capture_init_iterator
capture_init_begin() const

Declared at: clang/include/clang/AST/Stmt.h:3710

clang::CapturedStmt::capture_init_iterator
capture_init_begin()

Description

Retrieve the first initialization argument.

Declared at: clang/include/clang/AST/Stmt.h:3706

clang::CapturedStmt::const_capture_init_iterator
capture_init_end() const

Declared at: clang/include/clang/AST/Stmt.h:3720

clang::CapturedStmt::capture_init_iterator
capture_init_end()

Description

Retrieve the iterator pointing one past the last initialization argument.

Declared at: clang/include/clang/AST/Stmt.h:3716

clang::CapturedStmt::const_capture_init_range
capture_inits() const

Declared at: clang/include/clang/AST/Stmt.h:3701

clang::CapturedStmt::capture_init_range
capture_inits()

Declared at: clang/include/clang/AST/Stmt.h:3697

unsigned int capture_size() const

Description

Retrieve the number of captures, including 'this'.

Declared at: clang/include/clang/AST/Stmt.h:3685

clang::CapturedStmt::capture_range captures()

Declared at: clang/include/clang/AST/Stmt.h:3667

clang::CapturedStmt::capture_const_range
captures() const

Declared at: clang/include/clang/AST/Stmt.h:3670

bool capturesVariable(
    const clang::VarDecl* Var) const

Description

True if this variable has been captured.

Declared at: clang/include/clang/AST/Stmt.h:3659

Parameters

const clang::VarDecl* Var

clang::Stmt::const_child_range children() const

Declared at: clang/include/clang/AST/Stmt.h:3742

clang::Stmt::child_range children()

Declared at: clang/include/clang/AST/Stmt.h:3740

static bool classof(const clang::Stmt* T)

Declared at: clang/include/clang/AST/Stmt.h:3736

Parameters

const clang::Stmt* T

clang::SourceLocation getBeginLoc() const

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

const clang::CapturedDecl* getCapturedDecl() const

Declared at: clang/include/clang/AST/Stmt.h:3638

clang::CapturedDecl* getCapturedDecl()

Description

Retrieve the outlined function declaration.

Declared at: clang/include/clang/AST/Stmt.h:3637

const clang::RecordDecl* getCapturedRecordDecl()
    const

Description

Retrieve the record declaration for captured variables.

Declared at: clang/include/clang/AST/Stmt.h:3650

clang::CapturedRegionKind getCapturedRegionKind()
    const

Description

Retrieve the captured region kind.

Declared at: clang/include/clang/AST/Stmt.h:3644

const clang::Stmt* getCapturedStmt() const

Declared at: clang/include/clang/AST/Stmt.h:3634

clang::Stmt* getCapturedStmt()

Description

Retrieve the statement being captured.

Declared at: clang/include/clang/AST/Stmt.h:3633

clang::SourceLocation getEndLoc() const

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

clang::SourceRange getSourceRange() const

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

clang::CapturedStmt::Capture* getStoredCaptures()
    const

Declared at: clang/include/clang/AST/Stmt.h:3616

clang::Stmt** getStoredStmts()

Declared at: clang/include/clang/AST/Stmt.h:3610

clang::Stmt* const* getStoredStmts() const

Declared at: clang/include/clang/AST/Stmt.h:3612

void setCapturedDecl(clang::CapturedDecl* D)

Description

Set the outlined function declaration.

Declared at: clang/include/clang/AST/Stmt.h:3641

Parameters

clang::CapturedDecl* D

void setCapturedRecordDecl(clang::RecordDecl* D)

Description

Set the record declaration for captured variables.

Declared at: clang/include/clang/AST/Stmt.h:3653

Parameters

clang::RecordDecl* D

void setCapturedRegionKind(
    clang::CapturedRegionKind Kind)

Description

Set the captured region kind.

Declared at: clang/include/clang/AST/Stmt.h:3647

Parameters

clang::CapturedRegionKind Kind

void setCapturedStmt(clang::Stmt* S)

Declared at: clang/include/clang/AST/Stmt.h:3618

Parameters

clang::Stmt* S