brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.3 KiB · 848a6d2 Raw
27 lines · c
1// RUN: %clang_cc1 %s -verify -fsyntax-only2 3struct s { int a; } __attribute__((deprecated)) x;  // expected-warning {{'s' is deprecated}} expected-note 2 {{'s' has been explicitly marked deprecated here}}4 5typeof(x) y;  // expected-warning {{'s' is deprecated}}6 7union un{ int a; } __attribute__((deprecated)) u;  // expected-warning {{'un' is deprecated}} expected-note 2 {{'un' has been explicitly marked deprecated here}}8 9typeof(     u) z; // expected-warning {{'un' is deprecated}}10 11enum E{ one} __attribute__((deprecated))  e; // expected-warning {{'E' is deprecated}} expected-note 2 {{'E' has been explicitly marked deprecated here}}12 13typeof( e) w; // expected-warning {{'E' is deprecated}}14 15struct foo { int x; } __attribute__((deprecated)); // expected-note {{'foo' has been explicitly marked deprecated here}}16typedef struct foo bar __attribute__((deprecated)); // expected-note {{'bar' has been explicitly marked deprecated here}}17bar x1;	// expected-warning {{'bar' is deprecated}}18 19int main(void) { typeof(x1) y; }	// expected-warning {{'foo' is deprecated}}20 21struct gorf { int x; };22typedef struct gorf T __attribute__((deprecated));  // expected-note {{'T' has been explicitly marked deprecated here}}23T t;	// expected-warning {{'T' is deprecated}}24void wee(void) { typeof(t) y; }25 26 27