clang API Documentation

Classes | Public Types | Public Member Functions | Static Public Member Functions | Public Attributes
clang::sema::CapturingScopeInfo Class Reference

#include <ScopeInfo.h>

Inheritance diagram for clang::sema::CapturingScopeInfo:
Inheritance graph
[legend]
Collaboration diagram for clang::sema::CapturingScopeInfo:
Collaboration graph
[legend]

List of all members.

Classes

class  Capture

Public Types

enum  ImplicitCaptureStyle { ImpCap_None, ImpCap_LambdaByval, ImpCap_LambdaByref, ImpCap_Block }

Public Member Functions

 CapturingScopeInfo (DiagnosticsEngine &Diag, ImplicitCaptureStyle Style)
void addCapture (VarDecl *Var, bool isBlock, bool isByref, bool isNested, SourceLocation Loc, SourceLocation EllipsisLoc, QualType CaptureType, Expr *Cpy)
void addThisCapture (bool isNested, SourceLocation Loc, QualType CaptureType, Expr *Cpy)
bool isCXXThisCaptured () const
 Determine whether the C++ 'this' is captured.
CapturegetCXXThisCapture ()
 Retrieve the capture of C++ 'this', if it has been captured.
bool isCaptured (VarDecl *Var) const
 Determine whether the given variable has been captured.
CapturegetCapture (VarDecl *Var)
 Retrieve the capture of the given variable, if it has been captured already.
const CapturegetCapture (VarDecl *Var) const

Static Public Member Functions

static bool classof (const FunctionScopeInfo *FSI)
static bool classof (const CapturingScopeInfo *BSI)

Public Attributes

ImplicitCaptureStyle ImpCaptureStyle
llvm::DenseMap< VarDecl
*, unsigned > 
CaptureMap
 CaptureMap - A map of captured variables to (index+1) into Captures.
unsigned CXXThisCaptureIndex
SmallVector< Capture, 4 > Captures
 Captures - The captures.
bool HasImplicitReturnType
 
  • Whether the target type of return statements in this context is deduced (e.g. a lambda or block with omitted return type).

QualType ReturnType

Detailed Description

Definition at line 141 of file ScopeInfo.h.


Member Enumeration Documentation

Enumerator:
ImpCap_None 
ImpCap_LambdaByval 
ImpCap_LambdaByref 
ImpCap_Block 

Definition at line 143 of file ScopeInfo.h.


Constructor & Destructor Documentation

clang::sema::CapturingScopeInfo::CapturingScopeInfo ( DiagnosticsEngine Diag,
ImplicitCaptureStyle  Style 
) [inline]

Definition at line 223 of file ScopeInfo.h.


Member Function Documentation

void clang::sema::CapturingScopeInfo::addCapture ( VarDecl Var,
bool  isBlock,
bool  isByref,
bool  isNested,
SourceLocation  Loc,
SourceLocation  EllipsisLoc,
QualType  CaptureType,
Expr Cpy 
) [inline]

Definition at line 246 of file ScopeInfo.h.

References CaptureMap, and Captures.

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

void clang::sema::CapturingScopeInfo::addThisCapture ( bool  isNested,
SourceLocation  Loc,
QualType  CaptureType,
Expr Cpy 
) [inline]
static bool clang::sema::CapturingScopeInfo::classof ( const FunctionScopeInfo FSI) [inline, static]
static bool clang::sema::CapturingScopeInfo::classof ( const CapturingScopeInfo BSI) [inline, static]

Definition at line 292 of file ScopeInfo.h.

Capture& clang::sema::CapturingScopeInfo::getCapture ( VarDecl Var) [inline]

Retrieve the capture of the given variable, if it has been captured already.

Definition at line 277 of file ScopeInfo.h.

References CaptureMap, Captures, and isCaptured().

Referenced by clang::Sema::ActOnStartOfLambdaDefinition(), and clang::Sema::tryCaptureVariable().

const Capture& clang::sema::CapturingScopeInfo::getCapture ( VarDecl Var) const [inline]

Definition at line 282 of file ScopeInfo.h.

References CaptureMap, and Captures.

Capture& clang::sema::CapturingScopeInfo::getCXXThisCapture ( ) [inline]

Retrieve the capture of C++ 'this', if it has been captured.

Definition at line 265 of file ScopeInfo.h.

References Captures, CXXThisCaptureIndex, and isCXXThisCaptured().

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

bool clang::sema::CapturingScopeInfo::isCaptured ( VarDecl Var) const [inline]

Determine whether the given variable has been captured.

Definition at line 271 of file ScopeInfo.h.

References CaptureMap.

Referenced by clang::Sema::ActOnStartOfLambdaDefinition(), and getCapture().

bool clang::sema::CapturingScopeInfo::isCXXThisCaptured ( ) const [inline]

Determine whether the C++ 'this' is captured.

Definition at line 262 of file ScopeInfo.h.

References CXXThisCaptureIndex.

Referenced by clang::Sema::ActOnStartOfLambdaDefinition(), and getCXXThisCapture().


Member Data Documentation

CaptureMap - A map of captured variables to (index+1) into Captures.

Definition at line 229 of file ScopeInfo.h.

Referenced by addCapture(), getCapture(), isCaptured(), and clang::Sema::tryCaptureVariable().

CXXThisCaptureIndex - The (index+1) of the capture of 'this'; zero if 'this' is not captured.

Definition at line 233 of file ScopeInfo.h.

Referenced by clang::Sema::ActOnBlockStmtExpr(), addThisCapture(), getCXXThisCapture(), and isCXXThisCaptured().

  • Whether the target type of return statements in this context is deduced (e.g. a lambda or block with omitted return type).

Definition at line 240 of file ScopeInfo.h.

Referenced by clang::Sema::ActOnCapScopeReturnStmt(), and clang::Sema::ActOnLambdaExpr().

Definition at line 147 of file ScopeInfo.h.

Referenced by clang::Sema::ActOnLambdaExpr(), and clang::Sema::tryCaptureVariable().

ReturnType - The target type of return statements in this context, or null if unknown.

Definition at line 244 of file ScopeInfo.h.

Referenced by clang::Sema::ActOnBlockStmtExpr(), clang::Sema::ActOnCapScopeReturnStmt(), clang::Sema::ActOnLambdaExpr(), and AddOrdinaryNameResults().


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