2012-02-01 09:18:43 +08:00
|
|
|
// RUN: %clang_cc1 -std=c++11 %s -verify
|
|
|
|
|
2012-02-09 08:47:04 +08:00
|
|
|
int GlobalVar; // expected-note {{declared here}}
|
2012-02-01 09:18:43 +08:00
|
|
|
|
|
|
|
namespace N {
|
|
|
|
int AmbiguousVar; // expected-note {{candidate}}
|
|
|
|
}
|
|
|
|
int AmbiguousVar; // expected-note {{candidate}}
|
|
|
|
using namespace N;
|
|
|
|
|
|
|
|
class X0 {
|
|
|
|
int Member;
|
|
|
|
|
|
|
|
static void Overload(int);
|
|
|
|
void Overload();
|
|
|
|
virtual X0& Overload(float);
|
|
|
|
|
|
|
|
void explicit_capture() {
|
2012-02-09 08:47:04 +08:00
|
|
|
int variable; // expected-note {{declared here}}
|
2012-02-09 16:26:42 +08:00
|
|
|
(void)[&Overload] () {}; // expected-error {{does not name a variable}}
|
|
|
|
(void)[&GlobalVar] () {}; // expected-error {{does not have automatic storage duration}}
|
|
|
|
(void)[&AmbiguousVar] () {}; // expected-error {{reference to 'AmbiguousVar' is ambiguous}}
|
|
|
|
(void)[&Variable] () {}; // expected-error {{use of undeclared identifier 'Variable'; did you mean 'variable'}}
|
2012-02-01 09:18:43 +08:00
|
|
|
}
|
|
|
|
};
|