Per latest drafting, switch to implementing init-captures as if by declaring
and capturing a variable declaration, and complete the implementation of them.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@191605 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/Parser/cxx0x-lambda-expressions.cpp b/test/Parser/cxx0x-lambda-expressions.cpp
index 76c1e0e..426e530 100644
--- a/test/Parser/cxx0x-lambda-expressions.cpp
+++ b/test/Parser/cxx0x-lambda-expressions.cpp
@@ -52,18 +52,16 @@
   // We support init-captures in C++11 as an extension.
   int z;
   void init_capture() {
-    // FIXME: These diagnostics should all disappear once semantic analysis
-    // for init-captures is complete.
-    [n(0)] () -> int { return ++n; }; // expected-error {{non-static data member}}
+    [n(0)] () mutable -> int { return ++n; };
     [n{0}] { return; }; // expected-error {{<initializer_list>}}
-    [n = 0] { return ++n; }; // expected-error {{non-static data member}}
+    [n = 0] { return ++n; }; // expected-error {{captured by copy in a non-mutable}}
     [n = {0}] { return; }; // expected-error {{<initializer_list>}}
     [a([&b = z]{})](){};
 
     int x = 4;
     auto y = [&r = x, x = x + 1]() -> int {
-      r += 2; // expected-error {{non-static data member}}
-      return x + 2; // expected-error {{non-static data member}}
+      r += 2;
+      return x + 2;
     } ();
   }
 };