blob: 238e5019f1212e31ece5f9d874a305a2648a9ff0 [file] [log] [blame]
Fariborz Jahanian2b1d51b2010-10-05 23:24:00 +00001// RUN: %clang_cc1 %s -verify -fsyntax-only
2
3struct s { int a; } __attribute__((deprecated)) x; // expected-warning {{'s' is deprecated}}
4
5typeof(x) y; // expected-warning {{'s' is deprecated}}
6
7union un{ int a; } __attribute__((deprecated)) u; // expected-warning {{'un' is deprecated}}
8
9typeof( u) z; // expected-warning {{'un' is deprecated}}
10
11enum E{ one} __attribute__((deprecated)) e; // expected-warning {{'E' is deprecated}}
12
13typeof( e) w; // expected-warning {{'E' is deprecated}}
Fariborz Jahanian730e1752010-10-06 17:00:02 +000014
15struct foo { int x; } __attribute__((deprecated));
16typedef struct foo bar __attribute__((deprecated));
17bar x1; // expected-warning {{'bar' is deprecated}}
18
19int main() { typeof(x1) y; } // expected-warning {{'foo' is deprecated}}
20
21struct gorf { int x; };
22typedef struct gorf T __attribute__((deprecated));
23T t; // expected-warning {{'T' is deprecated}}
24void wee() { typeof(t) y; }
25
26