| 1 |
// RUN: %clang_cc1 -fobjc-runtime=gcc -frecovery-ast -verify %s |
| 2 |
|
| 3 |
@interface Ivar |
| 4 |
{ |
| 5 |
int Foo : foo(); // expected-error {{use of undeclared identifier}} |
| 6 |
}; |
| 7 |
@end |
| 8 |
|
| 9 |
struct X { int Y: foo(); }; // expected-error {{use of undeclared identifier}} |
| 10 |
|
| 11 |
constexpr int s = sizeof(Ivar); |
| 12 |
constexpr int ss = sizeof(X); |
| 13 |
|
| 14 |
auto func() { |
| 15 |
return undef(); // expected-error {{use of undeclared identifier}} |
| 16 |
} |
| 17 |
struct Y { |
| 18 |
int X : func(); |
| 19 |
}; |
| 20 |
constexpr int sss = sizeof(Y); |
| 21 |
|
| 22 |
bool Foo(int *); // expected-note {{candidate function not viable}} |
| 23 |
template <typename T> |
| 24 |
struct Base {}; |
| 25 |
template <typename T> |
| 26 |
auto func() { |
| 27 |
// error-bit should be propagated from TemplateArgument to NestNameSpecifier. |
| 28 |
class Base<decltype(Foo(T()))>::type C; // expected-error {{no matching function for call to 'Foo'}} |
| 29 |
return C; |
| 30 |
} |
| 31 |
struct Z { |
| 32 |
int X : func<int>(); // expected-note {{in instantiation of function template}} |
| 33 |
}; |
| 34 |
constexpr int ssss = sizeof(Z); |
| 35 |
|
| 36 |
struct Z2 { |
| 37 |
int X : sizeof(_BitInt(invalid())); // expected-error {{use of undeclared identifier}} |
| 38 |
}; |
| 39 |
constexpr int sssss = sizeof(Z2); |