clang API Documentation
#include <ScopeInfo.h>


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. | |
| Capture & | getCXXThisCapture () |
| 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. | |
| Capture & | getCapture (VarDecl *Var) |
| Retrieve the capture of the given variable, if it has been captured already. | |
| const Capture & | getCapture (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 |
| |
| QualType | ReturnType |
Definition at line 346 of file ScopeInfo.h.
Definition at line 348 of file ScopeInfo.h.
| clang::sema::CapturingScopeInfo::CapturingScopeInfo | ( | DiagnosticsEngine & | Diag, |
| ImplicitCaptureStyle | Style | ||
| ) | [inline] |
Definition at line 453 of file ScopeInfo.h.
| 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 476 of file ScopeInfo.h.
References CaptureMap, and Captures.
Referenced by clang::Sema::buildInitCaptureField(), captureInBlock(), captureInCapturedRegion(), captureInLambda(), and RebuildLambdaScopeInfo().
| 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().
| void clang::sema::CapturingScopeInfo::addVLATypeCapture | ( | SourceLocation | Loc, |
| QualType | CaptureType | ||
| ) | [inline] |
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] |
Reimplemented in clang::sema::LambdaScopeInfo, clang::sema::CapturedRegionScopeInfo, and clang::sema::BlockScopeInfo.
Definition at line 525 of file ScopeInfo.h.
References clang::sema::FunctionScopeInfo::Kind, clang::sema::FunctionScopeInfo::SK_Block, clang::sema::FunctionScopeInfo::SK_CapturedRegion, and clang::sema::FunctionScopeInfo::SK_Lambda.
| Capture& clang::sema::CapturingScopeInfo::getCapture | ( | VarDecl * | Var | ) | [inline] |
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().
| const Capture& clang::sema::CapturingScopeInfo::getCapture | ( | VarDecl * | Var | ) | const [inline] |
Definition at line 518 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 498 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 504 of file ScopeInfo.h.
References CaptureMap.
Referenced by clang::Sema::ActOnStartOfLambdaDefinition(), getCapture(), and getStackIndexOfNearestEnclosingCaptureReadyLambda().
| bool clang::sema::CapturingScopeInfo::isCXXThisCaptured | ( | ) | const [inline] |
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().
| bool CapturingScopeInfo::isVLATypeCaptured | ( | const VariableArrayType * | VAT | ) | const |
Determine whether the given variable-array type has been captured.
Definition at line 97 of file ScopeInfo.cpp.
Referenced by clang::Sema::tryCaptureVariable().
| llvm::DenseMap<VarDecl*, unsigned> clang::sema::CapturingScopeInfo::CaptureMap |
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().
| SmallVector<Capture, 4> clang::sema::CapturingScopeInfo::Captures |
Captures - The captures.
Definition at line 466 of file ScopeInfo.h.
Referenced by clang::Sema::ActOnBlockStmtExpr(), clang::Sema::ActOnCapturedRegionEnd(), clang::Sema::ActOnLambdaExpr(), addCapture(), addVLATypeCapture(), clang::sema::LambdaScopeInfo::finishedExplicitCaptures(), getCapture(), and getCXXThisCapture().
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().
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().
Definition at line 353 of file ScopeInfo.h.
Referenced by clang::Sema::ActOnLambdaExpr(), clang::Sema::buildLambdaScope(), clang::Sema::BuildMemberReferenceExpr(), captureInLambda(), getStackIndexOfNearestEnclosingCaptureReadyLambda(), RebuildLambdaScopeInfo(), and clang::Sema::tryCaptureVariable().
ReturnType - The target type of return statements in this context, or null if unknown.
Definition at line 474 of file ScopeInfo.h.
Referenced by clang::Sema::ActOnBlockStmtExpr(), clang::Sema::ActOnCapScopeReturnStmt(), clang::Sema::ActOnLambdaExpr(), AddOrdinaryNameResults(), clang::Sema::buildLambdaScope(), clang::Sema::deduceClosureReturnType(), clang::Sema::PushCapturedRegionScope(), and RebuildLambdaScopeInfo().