clang API Documentation

Public Member Functions | Friends
clang::CapturedStmt::Capture Class Reference

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

#include <Stmt.h>

List of all members.

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.
VarDeclgetCapturedVar () const
 Retrieve the declaration of the variable being captured.

Friends

class ASTStmtReader

Detailed Description

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

Definition at line 1995 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 2008 of file Stmt.h.

References clang::CapturedStmt::VCK_ByRef, clang::CapturedStmt::VCK_This, and clang::CapturedStmt::VCK_VLAType.


Member Function Documentation

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

Definition at line 2033 of file Stmt.h.

References getCaptureKind(), and clang::CapturedStmt::VCK_This.

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().

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.

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().

Determine the kind of capture.

Definition at line 2026 of file Stmt.h.

Referenced by capturesThis(), capturesVariable(), and capturesVariableArrayType().

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

Definition at line 2030 of file Stmt.h.


Friends And Related Function Documentation

friend class ASTStmtReader [friend]

Definition at line 2052 of file Stmt.h.


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