1 //===--- SemaLambda.h - Lambda Helper Functions --------------*- C++ -*-===//
\r
3 // The LLVM Compiler Infrastructure
\r
5 // This file is distributed under the University of Illinois Open Source
\r
6 // License. See LICENSE.TXT for details.
\r
8 //===----------------------------------------------------------------------===//
\r
11 /// \brief This file provides some common utility functions for processing
\r
14 //===----------------------------------------------------------------------===//
\r
16 #ifndef LLVM_CLANG_SEMA_LAMBDA_H
\r
17 #define LLVM_CLANG_SEMA_LAMBDA_H
\r
18 #include "clang/AST/ASTLambda.h"
\r
19 #include "clang/Sema/ScopeInfo.h"
\r
22 // Given a lambda's call operator and a variable (or null for 'this'),
\r
23 // compute the nearest enclosing lambda that is capture-ready (i.e
\r
24 // the enclosing context is not dependent, and all intervening lambdas can
\r
25 // either implicitly or explicitly capture Var)
\r
27 // Return the CallOperator of the capturable lambda and set function scope
\r
28 // index to the correct index within the function scope stack to correspond
\r
29 // to the capturable lambda.
\r
30 // If VarDecl *VD is null, we check for 'this' capture.
\r
32 GetInnermostEnclosingCapturableLambda(
\r
33 ArrayRef<sema::FunctionScopeInfo*> FunctionScopes,
\r
34 unsigned &FunctionScopeIndex,
\r
35 DeclContext *const CurContext, VarDecl *VD, Sema &S);
\r
39 #endif // LLVM_CLANG_SEMA_LAMBDA_H
\r