Douglas Gregor | 53a9bdf | 2012-02-01 01:18:43 +0000 | [diff] [blame^] | 1 | // RUN: %clang_cc1 -std=c++11 %s -verify |
| 2 | |
| 3 | int GlobalVar; // expected-note 2{{declared here}} |
| 4 | |
| 5 | namespace N { |
| 6 | int AmbiguousVar; // expected-note {{candidate}} |
| 7 | } |
| 8 | int AmbiguousVar; // expected-note {{candidate}} |
| 9 | using namespace N; |
| 10 | |
| 11 | class X0 { |
| 12 | int Member; |
| 13 | |
| 14 | static void Overload(int); |
| 15 | void Overload(); |
| 16 | virtual X0& Overload(float); |
| 17 | |
| 18 | void explicit_capture() { |
| 19 | [&Overload] () {}; // expected-error {{does not name a variable}} expected-error {{not supported yet}} |
| 20 | [&GlobalVar] () {}; // expected-error {{does not have automatic storage duration}} expected-error {{not supported yet}} |
| 21 | [&AmbiguousVar] () {} // expected-error {{reference to 'AmbiguousVar' is ambiguous}} expected-error {{not supported yet}} |
| 22 | [&Globalvar] () {}; // expected-error {{use of undeclared identifier 'Globalvar'; did you mean 'GlobalVar}} |
| 23 | } |
| 24 | }; |