blob: 7bcd10cc3e061e4fbaf05c48bd9c64712edc00f2 [file] [log] [blame]
Fariborz Jahanianb1224f62011-02-15 00:59:30 +00001// RUN: %clang_cc1 -fsyntax-only -Wdeprecated-implementations -verify %s
2// rdar://8973810
3
4@protocol P
5- (void) D __attribute__((deprecated)); // expected-note {{method declared here}}
6@end
7
8@interface A <P>
9+ (void)F __attribute__((deprecated)); // expected-note {{method declared here}}
10@end
11
12@interface A()
13- (void) E __attribute__((deprecated)); // expected-note {{method declared here}}
14@end
15
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
21
22__attribute__((deprecated))
23@interface CL // expected-note 2 {{class declared here}}
24@end
25
26@implementation CL // expected-warning {{Implementing deprecated class}}
27@end
28
29@implementation CL ( SomeCategory ) // expected-warning {{Implementing deprecated category}}
30@end
31
32@interface CL_SUB : CL // expected-warning {{'CL' is deprecated}}
33@end
34
35@interface BASE
36- (void) B __attribute__((deprecated)); // expected-note {{method declared here}}
37@end
38
39@interface SUB : BASE
40@end
41
42@implementation SUB
43- (void) B {} // expected-warning {{Implementing deprecated method}}
44@end
45