More lambda work. Tweak the Sema interface slightly.  Start adding the pieces to build the lambda class and its call operator.  Create an actual scope for the lambda body.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147595 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Parse/ParseExprCXX.cpp b/lib/Parse/ParseExprCXX.cpp
index 96f8709..e54858f 100644
--- a/lib/Parse/ParseExprCXX.cpp
+++ b/lib/Parse/ParseExprCXX.cpp
@@ -711,8 +711,6 @@
   PrettyStackTraceLoc CrashInfo(PP.getSourceManager(), LambdaBeginLoc,
                                 "lambda expression parsing");
 
-  Actions.ActOnLambdaStart(LambdaBeginLoc, getCurScope());
-
   // Parse lambda-declarator[opt].
   DeclSpec DS(AttrFactory);
   Declarator D(DS, Declarator::LambdaExprContext);
@@ -792,11 +790,10 @@
                                            DeclLoc, DeclEndLoc, D,
                                            TrailingReturnType),
                   Attr, DeclEndLoc);
-
-    // Inform sema that we are starting a block.
-    Actions.ActOnLambdaArguments(D, getCurScope());
   }
 
+  Actions.ActOnStartOfLambdaDefinition(Intro, D, getCurScope());
+
   // Parse compound-statement.
   if (!Tok.is(tok::l_brace)) {
     Diag(Tok, diag::err_expected_lambda_body);