| // RUN: %clang_cc1 -fsyntax-only -verify %s |
| char name[(int)&((struct bar *)0)->n]; |
| char name2[(int)&((struct bar *)0)->n - 1]; //expected-error{{'name2' declared as an array with a negative size}} |
| struct pppoe_tag hdr; //expected-warning{{field 'hdr' with variable sized type 'struct pppoe_tag' not at the end of a struct or class is a GNU extension}} |
| char a; // expected-note {{previous declaration is here}} |
| char a; // expected-error {{duplicate member 'a'}} |
| // <rdar://problem/8177927> - This previously triggered an assertion failure. |
| // rdar://problem/9150338 |
| static struct test1 { // expected-warning {{'static' ignored on this declaration}} |
| const struct test2 { // expected-warning {{'const' ignored on this declaration}} |
| inline struct test3 { // expected-error {{'inline' can only appear on functions}} |
| struct hiding_1 *hiding_1(); |
| extern struct hiding_2 *hiding_2; |
| struct hiding_1 *p = hiding_1(); |
| struct hiding_2 *q = hiding_2; |
| struct PreserveAttributes {}; |
| typedef struct __attribute__((noreturn)) PreserveAttributes PreserveAttributes_t; // expected-warning {{'noreturn' attribute only applies to functions and methods}} |