blob: 6f09c53e576e313a684c6240e635474d975db06b [file] [log] [blame]
Douglas Gregor53a9bdf2012-02-01 01:18:43 +00001// RUN: %clang_cc1 -std=c++11 %s -verify
2
Douglas Gregor8c50e7c2012-02-09 00:47:04 +00003int GlobalVar; // expected-note {{declared here}}
Douglas Gregor53a9bdf2012-02-01 01:18:43 +00004
5namespace N {
6 int AmbiguousVar; // expected-note {{candidate}}
7}
8int AmbiguousVar; // expected-note {{candidate}}
9using namespace N;
10
11class X0 {
12 int Member;
13
14 static void Overload(int);
15 void Overload();
16 virtual X0& Overload(float);
17
18 void explicit_capture() {
Douglas Gregor8c50e7c2012-02-09 00:47:04 +000019 int variable; // expected-note {{declared here}}
20 (void)[&Overload] () {}; // expected-error {{does not name a variable}} expected-error {{not supported yet}}
21 (void)[&GlobalVar] () {}; // expected-error {{does not have automatic storage duration}} expected-error {{not supported yet}}
22 (void)[&AmbiguousVar] () {}; // expected-error {{reference to 'AmbiguousVar' is ambiguous}} expected-error {{not supported yet}}
23 (void)[&Variable] () {}; // expected-error {{use of undeclared identifier 'Variable'; did you mean 'variable'}} \
24 // expected-error{{lambda expressions are not supported yet}}
Douglas Gregor53a9bdf2012-02-01 01:18:43 +000025 }
26};