]> CyberLeo.Net >> Repos - FreeBSD/releng/10.2.git/blob - contrib/llvm/tools/clang/include/clang/Sema/SemaLambda.h
- Copy stable/10@285827 to releng/10.2 in preparation for 10.2-RC1
[FreeBSD/releng/10.2.git] / contrib / llvm / tools / clang / include / clang / Sema / SemaLambda.h
1 //===--- SemaLambda.h - Lambda Helper Functions --------------*- C++ -*-===//\r
2 //\r
3 //                     The LLVM Compiler Infrastructure\r
4 //\r
5 // This file is distributed under the University of Illinois Open Source\r
6 // License. See LICENSE.TXT for details.\r
7 //\r
8 //===----------------------------------------------------------------------===//\r
9 ///\r
10 /// \file\r
11 /// \brief This file provides some common utility functions for processing\r
12 /// Lambdas.\r
13 ///\r
14 //===----------------------------------------------------------------------===//\r
15 \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
20 namespace clang {\r
21  \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
26 // \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
31 CXXMethodDecl* \r
32 GetInnermostEnclosingCapturableLambda( \r
33     ArrayRef<sema::FunctionScopeInfo*> FunctionScopes,\r
34     unsigned &FunctionScopeIndex,\r
35     DeclContext *const CurContext, VarDecl *VD, Sema &S);\r
36 \r
37 } // clang\r
38 \r
39 #endif // LLVM_CLANG_SEMA_LAMBDA_H\r