When completing a lambda expression, make sure to check and attach the
body of the lambda to the function call operator.

llvm-svn: 150087
diff --git a/clang/test/CXX/expr/expr.prim/expr.prim.lambda/p15.cpp b/clang/test/CXX/expr/expr.prim/expr.prim.lambda/p15.cpp
index a02340f..7264fa1 100644
--- a/clang/test/CXX/expr/expr.prim/expr.prim.lambda/p15.cpp
+++ b/clang/test/CXX/expr/expr.prim/expr.prim.lambda/p15.cpp
@@ -5,6 +5,6 @@
 };
 
 void capture_by_ref(NonCopyable nc, NonCopyable &ncr) {
-  [&nc] {}; // expected-error{{lambda expressions are not supported yet}}
-  [&ncr] {}; // expected-error{{lambda expressions are not supported yet}}
+  [&nc] () -> void {}; // expected-error{{lambda expressions are not supported yet}}
+  [&ncr] () -> void {}; // expected-error{{lambda expressions are not supported yet}}
 }
diff --git a/clang/test/CXX/expr/expr.prim/expr.prim.lambda/p7.cpp b/clang/test/CXX/expr/expr.prim/expr.prim.lambda/p7.cpp
new file mode 100644
index 0000000..239b6d4
--- /dev/null
+++ b/clang/test/CXX/expr/expr.prim/expr.prim.lambda/p7.cpp
@@ -0,0 +1,12 @@
+// RUN: %clang_cc1 -fsyntax-only -std=c++11 %s -verify
+
+// Check that analysis-based warnings work in lambda bodies.
+void analysis_based_warnings() {
+  []() -> int { }; // expected-warning{{control reaches end of non-void function}} \
+  // expected-error{{lambda expressions are not supported yet}}
+}
+
+// FIXME: Also check translation of captured vars to data members,
+// most of which isn't in the AST.
+
+