class CapturedStmt::Capture
Declaration
class CapturedStmt::Capture { /* full declaration omitted */ };
Description
Describes the capture of either a variable, or 'this', or variable-length array type.
Declared at: clang/include/clang/AST/Stmt.h:3545
Member Variables
- private llvm::PointerIntPair<VarDecl*, 2, VariableCaptureKind> VarAndKind
- private clang::SourceLocation Loc
Method Overview
- public Capture(clang::SourceLocation Loc, clang::CapturedStmt::VariableCaptureKind Kind, clang::VarDecl * Var = nullptr)
- public bool capturesThis() const
- public bool capturesVariable() const
- public bool capturesVariableArrayType() const
- public bool capturesVariableByCopy() const
- public clang::CapturedStmt::VariableCaptureKind getCaptureKind() const
- public clang::VarDecl * getCapturedVar() const
- public clang::SourceLocation getLocation() const
Methods
¶Capture(
clang::SourceLocation Loc,
clang::CapturedStmt::VariableCaptureKind Kind,
clang::VarDecl* Var = nullptr)
Capture(
clang::SourceLocation Loc,
clang::CapturedStmt::VariableCaptureKind Kind,
clang::VarDecl* Var = nullptr)
Description
Create a new capture.
Declared at: clang/include/clang/AST/Stmt.h:3559
Parameters
- clang::SourceLocation Loc
- The source location associated with this capture.
- clang::CapturedStmt::VariableCaptureKind Kind
- The kind of capture (this, ByRef, ...).
- clang::VarDecl* Var = nullptr
- The variable being captured, or null if capturing this.
¶bool capturesThis() const
bool capturesThis() const
Description
Determine whether this capture handles the C++ 'this' pointer.
Declared at: clang/include/clang/AST/Stmt.h:3570
¶bool capturesVariable() const
bool capturesVariable() const
Description
Determine whether this capture handles a variable (by reference).
Declared at: clang/include/clang/AST/Stmt.h:3573
¶bool capturesVariableArrayType() const
bool capturesVariableArrayType() const
Description
Determine whether this capture handles a variable-length array type.
Declared at: clang/include/clang/AST/Stmt.h:3582
¶bool capturesVariableByCopy() const
bool capturesVariableByCopy() const
Description
Determine whether this capture handles a variable by copy.
Declared at: clang/include/clang/AST/Stmt.h:3576
¶clang::CapturedStmt::VariableCaptureKind
getCaptureKind() const
clang::CapturedStmt::VariableCaptureKind
getCaptureKind() const
Description
Determine the kind of capture.
Declared at: clang/include/clang/AST/Stmt.h:3563
¶clang::VarDecl* getCapturedVar() const
clang::VarDecl* getCapturedVar() const
Description
Retrieve the declaration of the variable being captured. This operation is only valid if this capture captures a variable.
Declared at: clang/include/clang/AST/Stmt.h:3589
¶clang::SourceLocation getLocation() const
clang::SourceLocation getLocation() const
Description
Retrieve the source location at which the variable or 'this' was first used.
Declared at: clang/include/clang/AST/Stmt.h:3567