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,
  ImpCap_CapturedRegion
}

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 addVLATypeCapture (SourceLocation Loc, QualType CaptureType)
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.
bool isVLATypeCaptured (const VariableArrayType *VAT) const
 Determine whether the given variable-array type 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)

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


Member Enumeration Documentation

Enumerator:
ImpCap_None 
ImpCap_LambdaByval 
ImpCap_LambdaByref 
ImpCap_Block 
ImpCap_CapturedRegion 

Definition at line 348 of file ScopeInfo.h.


Constructor & Destructor Documentation

Definition at line 453 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]
void clang::sema::CapturingScopeInfo::addThisCapture ( bool  isNested,
SourceLocation  Loc,
QualType  CaptureType,
Expr Cpy 
) [inline]

Definition at line 820 of file ScopeInfo.h.

Referenced by clang::Sema::CheckCXXThisCapture(), and RebuildLambdaScopeInfo().

Definition at line 484 of file ScopeInfo.h.

References Captures.

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

static bool clang::sema::CapturingScopeInfo::classof ( const FunctionScopeInfo FSI) [inline, static]

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

Definition at line 513 of file ScopeInfo.h.

References CaptureMap, Captures, and isCaptured().

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

Definition at line 518 of file ScopeInfo.h.

References CaptureMap, and Captures.

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

Definition at line 498 of file ScopeInfo.h.

References Captures, CXXThisCaptureIndex, and isCXXThisCaptured().

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

Determine whether the given variable has been captured.

Definition at line 504 of file ScopeInfo.h.

References CaptureMap.

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

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

Definition at line 495 of file ScopeInfo.h.

References CXXThisCaptureIndex.

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

Determine whether the given variable-array type has been captured.

Definition at line 97 of file ScopeInfo.cpp.

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


Member Data Documentation

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

Definition at line 459 of file ScopeInfo.h.

Referenced by addCapture(), getCapture(), isCaptured(), and isVariableAlreadyCapturedInScopeInfo().

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

Definition at line 463 of file ScopeInfo.h.

Referenced by clang::Sema::ActOnBlockStmtExpr(), 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 470 of file ScopeInfo.h.

Referenced by clang::Sema::ActOnBlockStmtExpr(), clang::Sema::ActOnCapScopeReturnStmt(), clang::Sema::ActOnLambdaExpr(), clang::Sema::buildLambdaScope(), clang::Sema::deduceClosureReturnType(), and clang::Sema::DeduceFunctionTypeFromReturnExpr().


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