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