clang  8.0.0svn
Public Types | Public Member Functions | List of all members
clang::sema::Capture Class Reference

#include "clang/Sema/ScopeInfo.h"

Public Types

enum  IsThisCapture { ThisCapture }
 

Public Member Functions

 Capture (VarDecl *Var, bool Block, bool ByRef, bool IsNested, SourceLocation Loc, SourceLocation EllipsisLoc, QualType CaptureType, Expr *Cpy)
 
 Capture (IsThisCapture, bool IsNested, SourceLocation Loc, QualType CaptureType, Expr *Cpy, const bool ByCopy)
 
bool isThisCapture () const
 
bool isVariableCapture () const
 
bool isCopyCapture () const
 
bool isReferenceCapture () const
 
bool isBlockCapture () const
 
bool isVLATypeCapture () const
 
bool isNested () const
 
bool isODRUsed () const
 
bool isNonODRUsed () const
 
void markUsed (bool IsODRUse)
 
VarDeclgetVariable () const
 
SourceLocation getLocation () const
 Retrieve the location at which this variable was captured. More...
 
SourceLocation getEllipsisLoc () const
 Retrieve the source location of the ellipsis, whose presence indicates that the capture is a pack expansion. More...
 
QualType getCaptureType () const
 Retrieve the capture type for this capture, which is effectively the type of the non-static data member in the lambda/block structure that would store this capture. More...
 
ExprgetInitExpr () const
 

Detailed Description

Definition at line 493 of file ScopeInfo.h.

Member Enumeration Documentation

◆ IsThisCapture

Enumerator
ThisCapture 

Definition at line 553 of file ScopeInfo.h.

Constructor & Destructor Documentation

◆ Capture() [1/2]

clang::sema::Capture::Capture ( VarDecl Var,
bool  Block,
bool  ByRef,
bool  IsNested,
SourceLocation  Loc,
SourceLocation  EllipsisLoc,
QualType  CaptureType,
Expr Cpy 
)
inline

Definition at line 544 of file ScopeInfo.h.

◆ Capture() [2/2]

clang::sema::Capture::Capture ( IsThisCapture  ,
bool  IsNested,
SourceLocation  Loc,
QualType  CaptureType,
Expr Cpy,
const bool  ByCopy 
)
inline

Definition at line 554 of file ScopeInfo.h.

Member Function Documentation

◆ getCaptureType()

QualType clang::sema::Capture::getCaptureType ( ) const
inline

Retrieve the capture type for this capture, which is effectively the type of the non-static data member in the lambda/block structure that would store this capture.

Definition at line 608 of file ScopeInfo.h.

Referenced by isVariableAlreadyCapturedInScopeInfo().

◆ getEllipsisLoc()

SourceLocation clang::sema::Capture::getEllipsisLoc ( ) const
inline

Retrieve the source location of the ellipsis, whose presence indicates that the capture is a pack expansion.

Definition at line 603 of file ScopeInfo.h.

Referenced by clang::Sema::BuildLambdaExpr().

◆ getInitExpr()

Expr* clang::sema::Capture::getInitExpr ( ) const
inline

◆ getLocation()

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

Retrieve the location at which this variable was captured.

Definition at line 599 of file ScopeInfo.h.

Referenced by clang::Sema::BuildLambdaExpr(), clang::Sema::DiagnoseUnusedLambdaCapture(), and getCaptureLocation().

◆ getVariable()

VarDecl* clang::sema::Capture::getVariable ( ) const
inline

◆ isBlockCapture()

bool clang::sema::Capture::isBlockCapture ( ) const
inline

Definition at line 577 of file ScopeInfo.h.

Referenced by clang::Sema::BuildLambdaExpr().

◆ isCopyCapture()

bool clang::sema::Capture::isCopyCapture ( ) const
inline

◆ isNested()

bool clang::sema::Capture::isNested ( ) const
inline

Definition at line 585 of file ScopeInfo.h.

◆ isNonODRUsed()

bool clang::sema::Capture::isNonODRUsed ( ) const
inline

◆ isODRUsed()

bool clang::sema::Capture::isODRUsed ( ) const
inline

Definition at line 589 of file ScopeInfo.h.

Referenced by clang::Sema::BuildLambdaExpr().

◆ isReferenceCapture()

bool clang::sema::Capture::isReferenceCapture ( ) const
inline

Definition at line 573 of file ScopeInfo.h.

◆ isThisCapture()

bool clang::sema::Capture::isThisCapture ( ) const
inline

◆ isVariableCapture()

bool clang::sema::Capture::isVariableCapture ( ) const
inline

Definition at line 565 of file ScopeInfo.h.

Referenced by getCaptureLocation().

◆ isVLATypeCapture()

bool clang::sema::Capture::isVLATypeCapture ( ) const
inline

◆ markUsed()

void clang::sema::Capture::markUsed ( bool  IsODRUse)
inline

Definition at line 591 of file ScopeInfo.h.

Referenced by clang::Sema::tryCaptureVariable().


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