|
clang
3.8.0
|
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. More... | |
| VariableCaptureKind | getCaptureKind () const |
| Determine the kind of capture. More... | |
| SourceLocation | getLocation () const |
| Retrieve the source location at which the variable or 'this' was first used. More... | |
| bool | capturesThis () const |
| Determine whether this capture handles the C++ 'this' pointer. More... | |
| bool | capturesVariable () const |
| Determine whether this capture handles a variable (by reference). More... | |
| bool | capturesVariableByCopy () const |
| Determine whether this capture handles a variable by copy. More... | |
| bool | capturesVariableArrayType () const |
| Determine whether this capture handles a variable-length array type. More... | |
| VarDecl * | getCapturedVar () const |
| Retrieve the declaration of the variable being captured. More... | |
Friends | |
| class | ASTStmtReader |
Describes the capture of either a variable, or 'this', or variable-length array type.
| CapturedStmt::Capture::Capture | ( | SourceLocation | Loc, |
| VariableCaptureKind | Kind, | ||
| VarDecl * | Var = nullptr |
||
| ) |
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 948 of file Stmt.cpp.
References clang::Type::castAs(), clang::ValueDecl::getType(), clang::Type::isReferenceType(), clang::Type::isScalarType(), clang::CapturedStmt::VCK_ByCopy, clang::CapturedStmt::VCK_ByRef, clang::CapturedStmt::VCK_This, and clang::CapturedStmt::VCK_VLAType.
|
inline |
|
inline |
|
inline |
|
inline |
| VarDecl * CapturedStmt::Capture::getCapturedVar | ( | ) | const |
Retrieve the declaration of the variable being captured.
This operation is only valid if this capture captures a variable.
Definition at line 980 of file Stmt.cpp.
References clang::CapturedStmt::capturesVariable().
| CapturedStmt::VariableCaptureKind CapturedStmt::Capture::getCaptureKind | ( | ) | const |
|
inline |
|
friend |
1.8.6