clang
15.0.0git
include
clang
Basic
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.
22
enum
LambdaCaptureDefault
{
23
LCD_None
,
24
LCD_ByCopy
,
25
LCD_ByRef
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.
33
enum
LambdaCaptureKind
{
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
clang::LambdaCaptureDefault
LambdaCaptureDefault
The default, if any, capture method for a lambda expression.
Definition:
Lambda.h:22
clang::LCD_ByCopy
@ LCD_ByCopy
Definition:
Lambda.h:24
clang::LCD_None
@ LCD_None
Definition:
Lambda.h:23
clang::LambdaCaptureKind
LambdaCaptureKind
The different capture forms in a lambda introducer.
Definition:
Lambda.h:33
clang::LCD_ByRef
@ LCD_ByRef
Definition:
Lambda.h:25
clang::LCK_ByRef
@ LCK_ByRef
Capturing by reference.
Definition:
Lambda.h:37
clang::LCK_StarThis
@ LCK_StarThis
Capturing the *this object by copy.
Definition:
Lambda.h:35
clang::LCK_ByCopy
@ LCK_ByCopy
Capturing by copy (a.k.a., by value)
Definition:
Lambda.h:36
clang::LCK_VLAType
@ LCK_VLAType
Capturing variable-length array type.
Definition:
Lambda.h:38
clang
Definition:
CalledOnceCheck.h:17
clang::LCK_This
@ LCK_This
Capturing the *this object by reference.
Definition:
Lambda.h:34
Generated on Tue May 17 2022 09:32:32 for clang by
1.8.17