clang API Documentation
Describes the capture of either a variable, or 'this', or variable-length array type. More...
#include <Stmt.h>
Public Member Functions | |
Capture (SourceLocation Loc, VariableCaptureKind Kind, VarDecl *Var=nullptr) | |
Create a new capture. | |
VariableCaptureKind | getCaptureKind () const |
Determine the kind of capture. | |
SourceLocation | getLocation () const |
Retrieve the source location at which the variable or 'this' was first used. | |
bool | capturesThis () const |
Determine whether this capture handles the C++ 'this' pointer. | |
bool | capturesVariable () const |
Determine whether this capture handles a variable. | |
bool | capturesVariableArrayType () const |
Determine whether this capture handles a variable-length array type. | |
VarDecl * | getCapturedVar () const |
Retrieve the declaration of the variable being captured. | |
Friends | |
class | ASTStmtReader |
Describes the capture of either a variable, or 'this', or variable-length array type.
clang::CapturedStmt::Capture::Capture | ( | SourceLocation | Loc, |
VariableCaptureKind | Kind, | ||
VarDecl * | Var = nullptr |
||
) | [inline] |
Create a new capture.
Loc | The source location associated with this capture. |
Kind | The kind of capture (this, ByRef, ...). |
Var | The variable being captured, or null if capturing this. |
Definition at line 2008 of file Stmt.h.
References clang::CapturedStmt::VCK_ByRef, clang::CapturedStmt::VCK_This, and clang::CapturedStmt::VCK_VLAType.
bool clang::CapturedStmt::Capture::capturesThis | ( | ) | const [inline] |
Determine whether this capture handles the C++ 'this' pointer.
Definition at line 2033 of file Stmt.h.
References getCaptureKind(), and clang::CapturedStmt::VCK_This.
bool clang::CapturedStmt::Capture::capturesVariable | ( | ) | const [inline] |
Determine whether this capture handles a variable.
Definition at line 2036 of file Stmt.h.
References getCaptureKind(), and clang::CapturedStmt::VCK_ByRef.
Referenced by getCapturedVar().
bool clang::CapturedStmt::Capture::capturesVariableArrayType | ( | ) | const [inline] |
Determine whether this capture handles a variable-length array type.
Definition at line 2040 of file Stmt.h.
References getCaptureKind(), and clang::CapturedStmt::VCK_VLAType.
VarDecl* clang::CapturedStmt::Capture::getCapturedVar | ( | ) | const [inline] |
Retrieve the declaration of the variable being captured.
This operation is only valid if this capture captures a variable.
Definition at line 2047 of file Stmt.h.
References capturesVariable().
VariableCaptureKind clang::CapturedStmt::Capture::getCaptureKind | ( | ) | const [inline] |
Determine the kind of capture.
Definition at line 2026 of file Stmt.h.
Referenced by capturesThis(), capturesVariable(), and capturesVariableArrayType().
SourceLocation clang::CapturedStmt::Capture::getLocation | ( | ) | const [inline] |
friend class ASTStmtReader [friend] |