• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1// RUN: %clang_cc1 -fsyntax-only -Wdeprecated-implementations -verify -Wno-objc-root-class %s
2// rdar://8973810
3
4@protocol P
5- (void) D __attribute__((deprecated)); // expected-note {{method 'D' declared here}}
6@end
7
8@interface A <P>
9+ (void)F __attribute__((deprecated)); // expected-note {{method 'F' declared here}}
10@end
11
12@interface A()
13- (void) E __attribute__((deprecated)); // expected-note {{method 'E' 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}} // expected-note 2 {{declared here}}
24@end
25
26@implementation CL // expected-warning {{Implementing deprecated class}}
27@end
28
29@implementation CL ( SomeCategory ) // expected-warning {{'CL' is deprecated}} \
30                                    // expected-warning {{Implementing deprecated category}}
31@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 'B' 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
47