clang  7.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 472 of file ScopeInfo.h.

Member Enumeration Documentation

◆ IsThisCapture

Enumerator
ThisCapture 

Definition at line 532 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 523 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 533 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 587 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 582 of file ScopeInfo.h.

◆ getInitExpr()

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

Definition at line 592 of file ScopeInfo.h.

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

◆ getLocation()

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

Retrieve the location at which this variable was captured.

Definition at line 578 of file ScopeInfo.h.

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

◆ getVariable()

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

Definition at line 572 of file ScopeInfo.h.

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

◆ isBlockCapture()

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

Definition at line 556 of file ScopeInfo.h.

◆ isCopyCapture()

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

Definition at line 548 of file ScopeInfo.h.

Referenced by isVariableAlreadyCapturedInScopeInfo().

◆ isNested()

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

Definition at line 564 of file ScopeInfo.h.

◆ isNonODRUsed()

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

Definition at line 569 of file ScopeInfo.h.

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

◆ isODRUsed()

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

Definition at line 568 of file ScopeInfo.h.

◆ isReferenceCapture()

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

Definition at line 552 of file ScopeInfo.h.

◆ isThisCapture()

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

Definition at line 540 of file ScopeInfo.h.

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

◆ isVariableCapture()

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

Definition at line 544 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 570 of file ScopeInfo.h.

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


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