2010-12-21 08:44:01 +08:00
|
|
|
// RUN: %clang_cc1 -fsyntax-only -verify %s
|
|
|
|
// rdar://8769853
|
|
|
|
|
|
|
|
@interface B
|
|
|
|
- (void) depInA;
|
2011-06-16 07:02:42 +08:00
|
|
|
- (void) unavailMeth __attribute__((unavailable)); // expected-note {{has been explicitly marked unavailable here}}
|
2013-12-19 07:30:06 +08:00
|
|
|
- (void) depInA1 __attribute__((deprecated)); // expected-note {{'depInA1' has been explicitly marked deprecated here}}
|
2010-12-21 08:44:01 +08:00
|
|
|
- (void) unavailMeth1;
|
2013-12-19 07:30:06 +08:00
|
|
|
- (void) depInA2 __attribute__((deprecated)); // expected-note {{'depInA2' has been explicitly marked deprecated here}}
|
2011-06-16 07:02:42 +08:00
|
|
|
- (void) unavailMeth2 __attribute__((unavailable)); // expected-note {{has been explicitly marked unavailable here}}
|
2010-12-21 08:44:01 +08:00
|
|
|
- (void) depunavailInA;
|
2011-06-16 07:02:42 +08:00
|
|
|
- (void) depunavailInA1 __attribute__((deprecated)) __attribute__((unavailable)); // expected-note {{has been explicitly marked unavailable here}}
|
2013-12-19 07:30:06 +08:00
|
|
|
- (void)FuzzyMeth __attribute__((deprecated)); // expected-note {{'FuzzyMeth' has been explicitly marked deprecated here}}
|
2010-12-21 08:44:01 +08:00
|
|
|
- (void)FuzzyMeth1 __attribute__((unavailable));
|
|
|
|
@end
|
|
|
|
|
|
|
|
@interface A
|
2011-06-16 07:02:42 +08:00
|
|
|
- (void) unavailMeth1 __attribute__((unavailable)); // expected-note {{has been explicitly marked unavailable here}}
|
2013-12-19 07:30:06 +08:00
|
|
|
- (void) depInA __attribute__((deprecated)); // expected-note {{'depInA' has been explicitly marked deprecated here}}
|
2010-12-21 08:44:01 +08:00
|
|
|
- (void) depInA2 __attribute__((deprecated));
|
|
|
|
- (void) depInA1;
|
|
|
|
- (void) unavailMeth2 __attribute__((unavailable));
|
2011-06-16 07:02:42 +08:00
|
|
|
- (void) depunavailInA __attribute__((deprecated)) __attribute__((unavailable)); // expected-note {{has been explicitly marked unavailable here}}
|
2010-12-21 08:44:01 +08:00
|
|
|
- (void) depunavailInA1;
|
|
|
|
- (void)FuzzyMeth __attribute__((unavailable));
|
2013-12-19 07:30:06 +08:00
|
|
|
- (void)FuzzyMeth1 __attribute__((deprecated)); // expected-note {{'FuzzyMeth1' has been explicitly marked deprecated here}}
|
2010-12-21 08:44:01 +08:00
|
|
|
@end
|
|
|
|
|
|
|
|
|
2013-12-19 07:30:06 +08:00
|
|
|
@class C; // expected-note 10 {{forward declaration of class here}}
|
2010-12-21 08:44:01 +08:00
|
|
|
|
|
|
|
void test(C *c) {
|
2013-12-20 06:47:11 +08:00
|
|
|
[c depInA]; // expected-warning {{'depInA' may be deprecated because the receiver type is unknown}}
|
|
|
|
[c unavailMeth]; // expected-warning {{'unavailMeth' may be unavailable because the receiver type is unknown}}
|
|
|
|
[c depInA1]; // expected-warning {{'depInA1' may be deprecated because the receiver type is unknown}}
|
|
|
|
[c unavailMeth1]; // expected-warning {{'unavailMeth1' may be unavailable because the receiver type is unknown}}
|
|
|
|
[c depInA2]; // expected-warning {{'depInA2' may be deprecated because the receiver type is unknown}}
|
|
|
|
[c unavailMeth2]; // expected-warning {{'unavailMeth2' may be unavailable because the receiver type is unknown}}
|
|
|
|
[c depunavailInA]; // expected-warning {{'depunavailInA' may be unavailable because the receiver type is unknown}}
|
|
|
|
[c depunavailInA1];// expected-warning {{'depunavailInA1' may be unavailable because the receiver type is unknown}}
|
|
|
|
[c FuzzyMeth]; // expected-warning {{'FuzzyMeth' may be deprecated because the receiver type is unknown}}
|
|
|
|
[c FuzzyMeth1]; // expected-warning {{'FuzzyMeth1' may be deprecated because the receiver type is unknown}}
|
2010-12-21 08:44:01 +08:00
|
|
|
|
|
|
|
}
|
|
|
|
|
2011-10-16 03:18:36 +08:00
|
|
|
// rdar://10268422
|
|
|
|
__attribute ((deprecated))
|
2013-12-19 07:30:06 +08:00
|
|
|
@interface DEPRECATED // expected-note {{'DEPRECATED' has been explicitly marked deprecated here}}
|
2011-10-16 03:18:36 +08:00
|
|
|
+(id)new;
|
|
|
|
@end
|
|
|
|
|
|
|
|
void foo() {
|
2011-12-15 08:38:15 +08:00
|
|
|
[DEPRECATED new]; // expected-warning {{'DEPRECATED' is deprecated}}
|
2011-10-16 03:18:36 +08:00
|
|
|
}
|
|
|
|
|