ΒΆOptional<unsigned int>
getStackIndexOfNearestEnclosingCaptureCapableLambda(
ArrayRef<const sema::FunctionScopeInfo*>
FunctionScopes,
clang::VarDecl* VarToCapture,
clang::Sema& S)
Optional<unsigned int>
getStackIndexOfNearestEnclosingCaptureCapableLambda(
ArrayRef<const sema::FunctionScopeInfo*>
FunctionScopes,
clang::VarDecl* VarToCapture,
clang::Sema& S)
Description
Examines the FunctionScopeInfo stack to determine the nearest enclosing lambda (to the current lambda) that is 'capture-capable' for the variable referenced in the current lambda (i.e. \p VarToCapture). If successful, returns the index into Sema's FunctionScopeInfo stack of the capture-capable lambda's LambdaScopeInfo. See Implementation for more detailed comments.
Declared at: clang/include/clang/Sema/SemaLambda.h:33
Parameters
- ArrayRef<const sema::FunctionScopeInfo*> FunctionScopes
- clang::VarDecl* VarToCapture
- clang::Sema& S