diff options
Diffstat (limited to 'lib/Sema/SemaLambda.cpp')
-rw-r--r-- | lib/Sema/SemaLambda.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/Sema/SemaLambda.cpp b/lib/Sema/SemaLambda.cpp index 73ef229a6b..6e9bea781d 100644 --- a/lib/Sema/SemaLambda.cpp +++ b/lib/Sema/SemaLambda.cpp @@ -32,7 +32,7 @@ void Sema::ActOnStartOfLambdaDefinition(LambdaIntroducer &Intro, /*IdLoc=*/Intro.Range.getBegin(), /*Id=*/0); Class->startDefinition(); - Class->setLambda(true); + Class->makeLambda(); CurContext->addDecl(Class); // Build the call operator; we don't really have all the relevant information @@ -408,6 +408,7 @@ ExprResult Sema::ActOnLambdaExpr(SourceLocation StartLoc, CaptureDefault, Captures, ExplicitParams, CaptureInits, Body->getLocEnd()); + Class->setLambda(Lambda); // C++11 [expr.prim.lambda]p2: // A lambda-expression shall not appear in an unevaluated operand |