clang API Documentation
#include <ScopeInfo.h>


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. | |
| 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. | |
| 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) |
| 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 |
| |
| QualType | ReturnType |
Definition at line 141 of file ScopeInfo.h.
Definition at line 143 of file ScopeInfo.h.
| clang::sema::CapturingScopeInfo::CapturingScopeInfo | ( | DiagnosticsEngine & | Diag, |
| ImplicitCaptureStyle | Style | ||
| ) | [inline] |
Definition at line 223 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 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] |
Definition at line 254 of file ScopeInfo.h.
References Captures, CXXThisCaptureIndex, and clang::sema::CapturingScopeInfo::Capture::ThisCapture.
Referenced by clang::Sema::CheckCXXThisCapture().
| static bool clang::sema::CapturingScopeInfo::classof | ( | const FunctionScopeInfo * | FSI | ) | [inline, static] |
Reimplemented from clang::sema::FunctionScopeInfo.
Reimplemented in clang::sema::LambdaScopeInfo, and clang::sema::BlockScopeInfo.
Definition at line 289 of file ScopeInfo.h.
References clang::sema::FunctionScopeInfo::Kind, clang::sema::FunctionScopeInfo::SK_Block, and clang::sema::FunctionScopeInfo::SK_Lambda.
| static bool clang::sema::CapturingScopeInfo::classof | ( | const CapturingScopeInfo * | BSI | ) | [inline, static] |
Definition at line 292 of file ScopeInfo.h.
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().
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().
| llvm::DenseMap<VarDecl*, unsigned> clang::sema::CapturingScopeInfo::CaptureMap |
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().
| SmallVector<Capture, 4> clang::sema::CapturingScopeInfo::Captures |
Captures - The captures.
Definition at line 236 of file ScopeInfo.h.
Referenced by clang::Sema::ActOnBlockStmtExpr(), clang::Sema::ActOnLambdaExpr(), addCapture(), addThisCapture(), 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 233 of file ScopeInfo.h.
Referenced by clang::Sema::ActOnBlockStmtExpr(), addThisCapture(), getCXXThisCapture(), and isCXXThisCaptured().
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().