summaryrefslogtreecommitdiffstats
path: root/clang/test/Parser/cxx0x-lambda-expressions.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/test/Parser/cxx0x-lambda-expressions.cpp')
-rw-r--r--clang/test/Parser/cxx0x-lambda-expressions.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/clang/test/Parser/cxx0x-lambda-expressions.cpp b/clang/test/Parser/cxx0x-lambda-expressions.cpp
index d7dc7d3a473..76c1e0e7cec 100644
--- a/clang/test/Parser/cxx0x-lambda-expressions.cpp
+++ b/clang/test/Parser/cxx0x-lambda-expressions.cpp
@@ -54,16 +54,16 @@ class C {
void init_capture() {
// FIXME: These diagnostics should all disappear once semantic analysis
// for init-captures is complete.
- [n(0)] () -> int { return ++n; }; // expected-error {{not supported}} expected-error {{undeclared}}
- [n{0}] { return; }; // expected-error {{not supported}}
- [n = 0] { return ++n; }; // expected-error {{not supported}} expected-error {{undeclared}}
- [n = {0}] { return; }; // expected-error {{not supported}}
- [a([&b = z]{})](){}; // expected-error 2{{not supported}}
+ [n(0)] () -> int { return ++n; }; // expected-error {{non-static data member}}
+ [n{0}] { return; }; // expected-error {{<initializer_list>}}
+ [n = 0] { return ++n; }; // expected-error {{non-static data member}}
+ [n = {0}] { return; }; // expected-error {{<initializer_list>}}
+ [a([&b = z]{})](){};
- int x = 4; // expected-note {{here}}
- auto y = [&r = x, x = x + 1]() -> int { // expected-error 2{{not supported}} expected-note {{here}}
- r += 2; // expected-error {{undeclared}}
- return x + 2; // expected-error {{implicitly captured}}
+ 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}}
} ();
}
};
OpenPOWER on IntegriCloud