aboutsummaryrefslogtreecommitdiff
path: root/include/clang/Sema
diff options
context:
space:
mode:
Diffstat (limited to 'include/clang/Sema')
-rw-r--r--include/clang/Sema/DeclSpec.h22
-rw-r--r--include/clang/Sema/ScopeInfo.h8
2 files changed, 10 insertions, 20 deletions
diff --git a/include/clang/Sema/DeclSpec.h b/include/clang/Sema/DeclSpec.h
index c4a96e1a3e..a1c1871574 100644
--- a/include/clang/Sema/DeclSpec.h
+++ b/include/clang/Sema/DeclSpec.h
@@ -25,6 +25,7 @@
#include "clang/AST/NestedNameSpecifier.h"
#include "clang/Lex/Token.h"
#include "clang/Basic/ExceptionSpecificationType.h"
+#include "clang/Basic/Lambda.h"
#include "clang/Basic/OperatorKinds.h"
#include "clang/Basic/Specifiers.h"
#include "llvm/ADT/SmallVector.h"
@@ -1917,31 +1918,14 @@ private:
SourceLocation LastLocation;
};
-/// LambdaCaptureDefault - The default, if any, capture method for a
-/// lambda expression.
-enum LambdaCaptureDefault {
- LCD_None,
- LCD_ByCopy,
- LCD_ByRef
-};
-
-/// LambdaCaptureKind - The different capture forms in a lambda
-/// introducer: 'this' or a copied or referenced variable.
-enum LambdaCaptureKind {
- LCK_This,
- LCK_ByCopy,
- LCK_ByRef
-};
-
/// LambdaCapture - An individual capture in a lambda introducer.
struct LambdaCapture {
LambdaCaptureKind Kind;
SourceLocation Loc;
IdentifierInfo* Id;
- LambdaCapture(LambdaCaptureKind Kind,
- SourceLocation Loc,
- IdentifierInfo* Id = 0)
+ LambdaCapture(LambdaCaptureKind Kind, SourceLocation Loc,
+ IdentifierInfo* Id = 0)
: Kind(Kind), Loc(Loc), Id(Id)
{}
};
diff --git a/include/clang/Sema/ScopeInfo.h b/include/clang/Sema/ScopeInfo.h
index a060015e5a..d6b10720c6 100644
--- a/include/clang/Sema/ScopeInfo.h
+++ b/include/clang/Sema/ScopeInfo.h
@@ -279,12 +279,18 @@ class LambdaScopeInfo : public CapturingScopeInfo {
public:
/// \brief The class that describes the lambda.
CXXRecordDecl *Lambda;
-
+
+ /// \brief Source range covering the lambda introducer [...].
+ SourceRange IntroducerRange;
+
/// \brief The number of captures in the \c Captures list that are
/// explicit captures.
unsigned NumExplicitCaptures;
bool Mutable;
+
+ /// \brief Whether the (empty) parameter list is explicit.
+ bool ExplicitParams;
LambdaScopeInfo(DiagnosticsEngine &Diag, CXXRecordDecl *Lambda)
: CapturingScopeInfo(Diag, ImpCap_None), Lambda(Lambda),