1*f4a2713aSLionel Sambuc// RUN: %clang_cc1 -fsyntax-only -Wdeprecated-implementations -verify -Wno-objc-root-class %s 2*f4a2713aSLionel Sambuc// rdar://8973810 3*f4a2713aSLionel Sambuc// rdar://12717705 4*f4a2713aSLionel Sambuc 5*f4a2713aSLionel Sambuc@protocol P 6*f4a2713aSLionel Sambuc- (void) D __attribute__((deprecated)); // expected-note {{method 'D' declared here}} 7*f4a2713aSLionel Sambuc@end 8*f4a2713aSLionel Sambuc 9*f4a2713aSLionel Sambuc@interface A <P> 10*f4a2713aSLionel Sambuc+ (void)F __attribute__((deprecated)); 11*f4a2713aSLionel Sambuc@end 12*f4a2713aSLionel Sambuc 13*f4a2713aSLionel Sambuc@interface A() 14*f4a2713aSLionel Sambuc- (void) E __attribute__((deprecated)); // expected-note {{method 'E' declared here}} 15*f4a2713aSLionel Sambuc@end 16*f4a2713aSLionel Sambuc 17*f4a2713aSLionel Sambuc@implementation A 18*f4a2713aSLionel Sambuc+ (void)F { } // No warning, implementing its own deprecated method 19*f4a2713aSLionel Sambuc- (void) D {} // expected-warning {{Implementing deprecated method}} 20*f4a2713aSLionel Sambuc- (void) E {} // expected-warning {{Implementing deprecated method}} 21*f4a2713aSLionel Sambuc@end 22*f4a2713aSLionel Sambuc 23*f4a2713aSLionel Sambuc@interface A(CAT) 24*f4a2713aSLionel Sambuc- (void) G __attribute__((deprecated)); 25*f4a2713aSLionel Sambuc@end 26*f4a2713aSLionel Sambuc 27*f4a2713aSLionel Sambuc@implementation A(CAT) 28*f4a2713aSLionel Sambuc- (void) G {} // No warning, implementing its own deprecated method 29*f4a2713aSLionel Sambuc@end 30*f4a2713aSLionel Sambuc 31*f4a2713aSLionel Sambuc__attribute__((deprecated)) 32*f4a2713aSLionel Sambuc@interface CL // expected-note 2 {{class declared here}} // expected-note 2 {{declared here}} 33*f4a2713aSLionel Sambuc@end 34*f4a2713aSLionel Sambuc 35*f4a2713aSLionel Sambuc@implementation CL // expected-warning {{Implementing deprecated class}} 36*f4a2713aSLionel Sambuc@end 37*f4a2713aSLionel Sambuc 38*f4a2713aSLionel Sambuc@implementation CL ( SomeCategory ) // expected-warning {{'CL' is deprecated}} \ 39*f4a2713aSLionel Sambuc // expected-warning {{Implementing deprecated category}} 40*f4a2713aSLionel Sambuc@end 41*f4a2713aSLionel Sambuc 42*f4a2713aSLionel Sambuc@interface CL_SUB : CL // expected-warning {{'CL' is deprecated}} 43*f4a2713aSLionel Sambuc@end 44*f4a2713aSLionel Sambuc 45*f4a2713aSLionel Sambuc@interface BASE 46*f4a2713aSLionel Sambuc- (void) B __attribute__((deprecated)); // expected-note {{method 'B' declared here}} 47*f4a2713aSLionel Sambuc@end 48*f4a2713aSLionel Sambuc 49*f4a2713aSLionel Sambuc@interface SUB : BASE 50*f4a2713aSLionel Sambuc@end 51*f4a2713aSLionel Sambuc 52*f4a2713aSLionel Sambuc@implementation SUB 53*f4a2713aSLionel Sambuc- (void) B {} // expected-warning {{Implementing deprecated method}} 54*f4a2713aSLionel Sambuc@end 55*f4a2713aSLionel Sambuc 56