clang  6.0.0svn
Lambda.h
Go to the documentation of this file.
1 //===--- Lambda.h - Types for C++ Lambdas -----------------------*- 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 /// \brief Defines several types used to describe C++ lambda expressions
12 /// that are shared between the parser and AST.
13 ///
14 //===----------------------------------------------------------------------===//
15 
16 
17 #ifndef LLVM_CLANG_BASIC_LAMBDA_H
18 #define LLVM_CLANG_BASIC_LAMBDA_H
19 
20 namespace clang {
21 
22 /// \brief The default, if any, capture method for a lambda expression.
27 };
28 
29 /// \brief The different capture forms in a lambda introducer
30 ///
31 /// C++11 allows capture of \c this, or of local variables by copy or
32 /// by reference. C++1y also allows "init-capture", where the initializer
33 /// is an expression.
35  LCK_This, ///< Capturing the \c *this object by reference
36  LCK_StarThis, /// < Capturing the \c *this object by copy
37  LCK_ByCopy, ///< Capturing by copy (a.k.a., by value)
38  LCK_ByRef, ///< Capturing by reference
39  LCK_VLAType ///< Capturing variable-length array type
40 };
41 
42 } // end namespace clang
43 
44 #endif // LLVM_CLANG_BASIC_LAMBDA_H
LambdaCaptureDefault
The default, if any, capture method for a lambda expression.
Definition: Lambda.h:23
LambdaCaptureKind
The different capture forms in a lambda introducer.
Definition: Lambda.h:34
< Capturing the *this object by copy
Definition: Lambda.h:37
Dataflow Directional Tag Classes.
Capturing variable-length array type.
Definition: Lambda.h:39
Capturing the *this object by reference.
Definition: Lambda.h:35
Capturing by reference.
Definition: Lambda.h:38