blob: 60da7b0c41dc71a6403b01cb5d8b7407c21760c1 [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
Argyrios Kyrtzidisc076e372011-10-06 23:23:27 +000029@implementation CL ( SomeCategory ) // expected-warning {{'CL' is deprecated}} \
30 // expected-warning {{Implementing deprecated category}}
Fariborz Jahanianb1224f62011-02-15 00:59:30 +000031@end
32
33@interface CL_SUB : CL // expected-warning {{'CL' is deprecated}}
34@end
35
36@interface BASE
37- (void) B __attribute__((deprecated)); // expected-note {{method declared here}}
38@end
39
40@interface SUB : BASE
41@end
42
43@implementation SUB
44- (void) B {} // expected-warning {{Implementing deprecated method}}
45@end
46