clang  8.0.0svn
SemaLambda.h
Go to the documentation of this file.
1 //===--- SemaLambda.h - Lambda Helper Functions --------------*- C++ -*-===//
2 //
3 // The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9 ///
10 /// \file
11 /// This file provides some common utility functions for processing
12 /// Lambdas.
13 ///
14 //===----------------------------------------------------------------------===//
15 
16 #ifndef LLVM_CLANG_SEMA_SEMALAMBDA_H
17 #define LLVM_CLANG_SEMA_SEMALAMBDA_H
18 
19 #include "clang/AST/ASTLambda.h"
20 
21 namespace clang {
22 namespace sema {
23 class FunctionScopeInfo;
24 }
25 class Sema;
26 
27 /// Examines the FunctionScopeInfo stack to determine the nearest
28 /// enclosing lambda (to the current lambda) that is 'capture-capable' for
29 /// the variable referenced in the current lambda (i.e. \p VarToCapture).
30 /// If successful, returns the index into Sema's FunctionScopeInfo stack
31 /// of the capture-capable lambda's LambdaScopeInfo.
32 /// See Implementation for more detailed comments.
33 
35  ArrayRef<const sema::FunctionScopeInfo *> FunctionScopes,
36  VarDecl *VarToCapture, Sema &S);
37 
38 } // clang
39 
40 #endif
This file provides some common utility functions for processing Lambda related AST Constructs...
Dataflow Directional Tag Classes.
Optional< unsigned > getStackIndexOfNearestEnclosingCaptureCapableLambda(ArrayRef< const sema::FunctionScopeInfo *> FunctionScopes, VarDecl *VarToCapture, Sema &S)
Examines the FunctionScopeInfo stack to determine the nearest enclosing lambda (to the current lambda...
Definition: SemaLambda.cpp:173