| 1 |
// RUN: %clang_cc1 -fsyntax-only -verify %s |
| 2 |
|
| 3 |
namespace N0 { |
| 4 |
struct A { |
| 5 |
void f0() noexcept(x); |
| 6 |
void g0() noexcept(y); // expected-error {{use of undeclared identifier 'y'}} |
| 7 |
|
| 8 |
void f1() noexcept(A::x); |
| 9 |
void g1() noexcept(A::y); // expected-error {{no member named 'y' in 'N0::A'}} |
| 10 |
|
| 11 |
template<typename T> |
| 12 |
void f2() noexcept(x); |
| 13 |
template<typename T> |
| 14 |
void g2() noexcept(y); // expected-error {{use of undeclared identifier 'y'}} |
| 15 |
|
| 16 |
template<typename T> |
| 17 |
void f3() noexcept(A::x); |
| 18 |
template<typename T> |
| 19 |
void g3() noexcept(A::y); // expected-error {{no member named 'y' in 'N0::A'}} |
| 20 |
|
| 21 |
friend void f4() noexcept(x); |
| 22 |
friend void g4() noexcept(y); // expected-error {{use of undeclared identifier 'y'}} |
| 23 |
|
| 24 |
friend void f5() noexcept(A::x); |
| 25 |
friend void g5() noexcept(A::y); // expected-error {{no member named 'y' in 'N0::A'}} |
| 26 |
|
| 27 |
template<typename T> |
| 28 |
friend void f6() noexcept(x); |
| 29 |
template<typename T> |
| 30 |
friend void g6() noexcept(y); // expected-error {{use of undeclared identifier 'y'}} |
| 31 |
|
| 32 |
template<typename T> |
| 33 |
friend void f7() noexcept(A::x); |
| 34 |
template<typename T> |
| 35 |
friend void g7() noexcept(A::y); // expected-error {{no member named 'y' in 'N0::A'}} |
| 36 |
|
| 37 |
static constexpr bool x = true; |
| 38 |
}; |
| 39 |
} // namespace N0 |
| 40 |
|
| 41 |
namespace N1 { |
| 42 |
template<typename T> |
| 43 |
struct A { |
| 44 |
void f0() noexcept(x); |
| 45 |
void g0() noexcept(y); // expected-error {{use of undeclared identifier 'y'}} |
| 46 |
|
| 47 |
void f1() noexcept(A::x); |
| 48 |
void g1() noexcept(A::y); // expected-error {{no member named 'y' in 'N1::A<T>'}} |
| 49 |
|
| 50 |
template<typename U> |
| 51 |
void f2() noexcept(x); |
| 52 |
template<typename U> |
| 53 |
void g2() noexcept(y); // expected-error {{use of undeclared identifier 'y'}} |
| 54 |
|
| 55 |
template<typename U> |
| 56 |
void f3() noexcept(A::x); |
| 57 |
template<typename U> |
| 58 |
void g3() noexcept(A::y); // expected-error {{no member named 'y' in 'N1::A<T>'}} |
| 59 |
|
| 60 |
friend void f4() noexcept(x); |
| 61 |
friend void g4() noexcept(y); // expected-error {{use of undeclared identifier 'y'}} |
| 62 |
|
| 63 |
friend void f5() noexcept(A::x); |
| 64 |
friend void g5() noexcept(A::y); // expected-error {{no member named 'y' in 'N1::A<T>'}} |
| 65 |
|
| 66 |
template<typename U> |
| 67 |
friend void f6() noexcept(x); |
| 68 |
template<typename U> |
| 69 |
friend void g6() noexcept(y); // expected-error {{use of undeclared identifier 'y'}} |
| 70 |
|
| 71 |
template<typename U> |
| 72 |
friend void f7() noexcept(A::x); |
| 73 |
template<typename U> |
| 74 |
friend void g7() noexcept(A::y); // expected-error {{no member named 'y' in 'N1::A<T>'}} |
| 75 |
|
| 76 |
static constexpr bool x = true; |
| 77 |
}; |
| 78 |
} // namespace N1 |