Douglas Gregor | 53a9bdf | 2012-02-01 01:18:43 +0000 | [diff] [blame] | 1 | // RUN: %clang_cc1 -std=c++11 %s -verify |
| 2 | |
| 3 | class X0 { |
| 4 | void explicit_capture() { |
| 5 | int foo; |
| 6 | |
Douglas Gregor | 8c50e7c | 2012-02-09 00:47:04 +0000 | [diff] [blame^] | 7 | (void)[foo, foo] () {}; // expected-error {{'foo' can appear only once}} expected-error {{not supported yet}} |
| 8 | (void)[this, this] () {}; // expected-error {{'this' can appear only once}} expected-error {{not supported yet}} |
| 9 | (void)[=, foo] () {}; // expected-error {{'&' must precede a capture when}} expected-error {{not supported yet}} |
| 10 | (void)[=, &foo] () {}; // expected-error {{not supported yet}} |
| 11 | (void)[=, this] () {}; // expected-error {{'this' cannot appear}} expected-error {{not supported yet}} |
| 12 | (void)[&, foo] () {}; // expected-error {{not supported yet}} |
| 13 | (void)[&, &foo] () {}; // expected-error {{'&' cannot precede a capture when}} expected-error {{not supported yet}} |
| 14 | (void)[&, this] () {}; // expected-error {{not supported yet}} |
Douglas Gregor | 53a9bdf | 2012-02-01 01:18:43 +0000 | [diff] [blame] | 15 | } |
| 16 | }; |