clang  3.7.0
Public Member Functions | Friends | List of all members
clang::CapturedStmt::Capture Class Reference

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. More...
 
bool capturesVariableArrayType () const
 Determine whether this capture handles a variable-length array type. More...
 
VarDeclgetCapturedVar () const
 Retrieve the declaration of the variable being captured. More...
 

Friends

class ASTStmtReader
 

Detailed Description

Describes the capture of either a variable, or 'this', or variable-length array type.

Definition at line 2001 of file Stmt.h.

Constructor & Destructor Documentation

clang::CapturedStmt::Capture::Capture ( SourceLocation  Loc,
VariableCaptureKind  Kind,
VarDecl Var = nullptr 
)
inline

Create a new capture.

Parameters
LocThe source location associated with this capture.
KindThe kind of capture (this, ByRef, ...).
VarThe variable being captured, or null if capturing this.

Definition at line 2014 of file Stmt.h.

Member Function Documentation

bool clang::CapturedStmt::Capture::capturesThis ( ) const
inline

Determine whether this capture handles the C++ 'this' pointer.

Definition at line 2039 of file Stmt.h.

bool clang::CapturedStmt::Capture::capturesVariable ( ) const
inline

Determine whether this capture handles a variable.

Definition at line 2042 of file Stmt.h.

bool clang::CapturedStmt::Capture::capturesVariableArrayType ( ) const
inline

Determine whether this capture handles a variable-length array type.

Definition at line 2046 of file Stmt.h.

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 2053 of file Stmt.h.

VariableCaptureKind clang::CapturedStmt::Capture::getCaptureKind ( ) const
inline

Determine the kind of capture.

Definition at line 2032 of file Stmt.h.

SourceLocation clang::CapturedStmt::Capture::getLocation ( ) const
inline

Retrieve the source location at which the variable or 'this' was first used.

Definition at line 2036 of file Stmt.h.

Friends And Related Function Documentation

friend class ASTStmtReader
friend

Definition at line 2058 of file Stmt.h.


The documentation for this class was generated from the following file: