clang  10.0.0svn
Lambda.h
Go to the documentation of this file.
1 //===--- Lambda.h - Types for C++ Lambdas -----------------------*- C++ -*-===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8 ///
9 /// \file
10 /// Defines several types used to describe C++ lambda expressions
11 /// that are shared between the parser and AST.
12 ///
13 //===----------------------------------------------------------------------===//
14 
15 
16 #ifndef LLVM_CLANG_BASIC_LAMBDA_H
17 #define LLVM_CLANG_BASIC_LAMBDA_H
18 
19 namespace clang {
20 
21 /// The default, if any, capture method for a lambda expression.
26 };
27 
28 /// The different capture forms in a lambda introducer
29 ///
30 /// C++11 allows capture of \c this, or of local variables by copy or
31 /// by reference. C++1y also allows "init-capture", where the initializer
32 /// is an expression.
34  LCK_This, ///< Capturing the \c *this object by reference
35  LCK_StarThis, /// < Capturing the \c *this object by copy
36  LCK_ByCopy, ///< Capturing by copy (a.k.a., by value)
37  LCK_ByRef, ///< Capturing by reference
38  LCK_VLAType ///< Capturing variable-length array type
39 };
40 
41 } // end namespace clang
42 
43 #endif // LLVM_CLANG_BASIC_LAMBDA_H
LambdaCaptureDefault
The default, if any, capture method for a lambda expression.
Definition: Lambda.h:22
LambdaCaptureKind
The different capture forms in a lambda introducer.
Definition: Lambda.h:33
< Capturing the *this object by copy
Definition: Lambda.h:36
Dataflow Directional Tag Classes.
Capturing variable-length array type.
Definition: Lambda.h:38
Capturing the *this object by reference.
Definition: Lambda.h:34
Capturing by reference.
Definition: Lambda.h:37