summaryrefslogtreecommitdiffstats
path: root/test/Parser/cxx0x-lambda-expressions.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/Parser/cxx0x-lambda-expressions.cpp')
-rw-r--r--test/Parser/cxx0x-lambda-expressions.cpp10
1 files changed, 4 insertions, 6 deletions
diff --git a/test/Parser/cxx0x-lambda-expressions.cpp b/test/Parser/cxx0x-lambda-expressions.cpp
index 76c1e0e7ce..426e530251 100644
--- a/test/Parser/cxx0x-lambda-expressions.cpp
+++ b/test/Parser/cxx0x-lambda-expressions.cpp
@@ -52,18 +52,16 @@ class C {
// 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;
} ();
}
};