1// RUN: %clang_cc1 -fsyntax-only -verify %s 2 3@interface B 4- (void) depInA; 5- (void) unavailMeth __attribute__((unavailable)); // expected-note {{has been explicitly marked unavailable here}} 6- (void) depInA1 __attribute__((deprecated)); // expected-note {{'depInA1' has been explicitly marked deprecated here}} 7- (void) unavailMeth1; 8- (void) depInA2 __attribute__((deprecated)); // expected-note {{'depInA2' has been explicitly marked deprecated here}} 9- (void) unavailMeth2 __attribute__((unavailable)); // expected-note {{has been explicitly marked unavailable here}} 10- (void) depunavailInA; 11- (void) depunavailInA1 __attribute__((deprecated)) __attribute__((unavailable)); // expected-note {{has been explicitly marked unavailable here}} 12- (void)FuzzyMeth __attribute__((deprecated)); // expected-note {{'FuzzyMeth' has been explicitly marked deprecated here}} 13- (void)FuzzyMeth1 __attribute__((unavailable)); 14@end 15 16@interface A 17- (void) unavailMeth1 __attribute__((unavailable)); // expected-note {{has been explicitly marked unavailable here}} 18- (void) depInA __attribute__((deprecated)); // expected-note {{'depInA' has been explicitly marked deprecated here}} 19- (void) depInA2 __attribute__((deprecated)); 20- (void) depInA1; 21- (void) unavailMeth2 __attribute__((unavailable)); 22- (void) depunavailInA __attribute__((deprecated)) __attribute__((unavailable)); // expected-note {{has been explicitly marked unavailable here}} 23- (void) depunavailInA1; 24- (void)FuzzyMeth __attribute__((unavailable)); 25- (void)FuzzyMeth1 __attribute__((deprecated)); // expected-note {{'FuzzyMeth1' has been explicitly marked deprecated here}} 26@end 27 28 29@class C; // expected-note 10 {{forward declaration of class here}} 30 31void test(C *c) { 32 [c depInA]; // expected-warning {{'depInA' may be deprecated because the receiver type is unknown}} 33 [c unavailMeth]; // expected-warning {{'unavailMeth' may be unavailable because the receiver type is unknown}} 34 [c depInA1]; // expected-warning {{'depInA1' may be deprecated because the receiver type is unknown}} 35 [c unavailMeth1]; // expected-warning {{'unavailMeth1' may be unavailable because the receiver type is unknown}} 36 [c depInA2]; // expected-warning {{'depInA2' may be deprecated because the receiver type is unknown}} 37 [c unavailMeth2]; // expected-warning {{'unavailMeth2' may be unavailable because the receiver type is unknown}} 38 [c depunavailInA]; // expected-warning {{'depunavailInA' may be unavailable because the receiver type is unknown}} 39 [c depunavailInA1];// expected-warning {{'depunavailInA1' may be unavailable because the receiver type is unknown}} 40 [c FuzzyMeth]; // expected-warning {{'FuzzyMeth' may be deprecated because the receiver type is unknown}} 41 [c FuzzyMeth1]; // expected-warning {{'FuzzyMeth1' may be deprecated because the receiver type is unknown}} 42 43} 44 45__attribute ((deprecated)) // expected-note {{'DEPRECATED' has been explicitly marked deprecated here}} 46@interface DEPRECATED 47+(id)new; 48@end 49 50void foo(void) { 51 [DEPRECATED new]; // expected-warning {{'DEPRECATED' is deprecated}} 52} 53 54