Fix the clang-wpa example.
[clang.git] / test / SemaObjC / warn-deprecated-implementations.m
blob7bcd10cc3e061e4fbaf05c48bd9c64712edc00f2
1 // RUN: %clang_cc1 -fsyntax-only -Wdeprecated-implementations -verify %s
2 // rdar://8973810
4 @protocol P
5 - (void) D __attribute__((deprecated)); // expected-note {{method declared here}}
6 @end
8 @interface A <P>
9 + (void)F __attribute__((deprecated)); // expected-note {{method declared here}}
10 @end
12 @interface A()
13 - (void) E __attribute__((deprecated)); // expected-note {{method declared here}}
14 @end
16 @implementation A
17 + (void)F { } //  expected-warning {{Implementing deprecated method}}
18 - (void) D {} //  expected-warning {{Implementing deprecated method}}
19 - (void) E {} //  expected-warning {{Implementing deprecated method}}
20 @end
22 __attribute__((deprecated))
23 @interface CL // expected-note 2 {{class declared here}}
24 @end
26 @implementation CL // expected-warning {{Implementing deprecated class}}
27 @end
29 @implementation CL ( SomeCategory ) // expected-warning {{Implementing deprecated category}}
30 @end
32 @interface CL_SUB : CL // expected-warning {{'CL' is deprecated}}
33 @end
35 @interface BASE
36 - (void) B __attribute__((deprecated)); // expected-note {{method declared here}}
37 @end
39 @interface SUB : BASE
40 @end
42 @implementation SUB
43 - (void) B {} // expected-warning {{Implementing deprecated method}}
44 @end