blob: 7c9ff0f13d906ac51c96f7be6de5c5368beecfee [file] [log] [blame]
Douglas Gregor710e0c42011-09-23 20:28:32 +00001// RUN: %clang_cc1 -triple x86_64-apple-darwin9.0.0 -fsyntax-only -verify %s
Fariborz Jahaniand6724362012-04-23 20:30:52 +00002
3@protocol P
4- (void)proto_method __attribute__((availability(macosx,introduced=10.1,deprecated=10.2))); // expected-note 2 {{method 'proto_method' declared here}}
5@end
6
7@interface A <P>
8- (void)method __attribute__((availability(macosx,introduced=10.1,deprecated=10.2))); // expected-note {{method 'method' declared here}}
Douglas Gregorc193dd82011-09-23 20:23:42 +00009@end
10
Fariborz Jahanian1ea67442012-06-05 21:14:46 +000011// rdar://11475360
Douglas Gregorc193dd82011-09-23 20:23:42 +000012@interface B : A
Fariborz Jahanian1ea67442012-06-05 21:14:46 +000013- (void)method; // expected-note {{method 'method' declared here}}
Douglas Gregorc193dd82011-09-23 20:23:42 +000014@end
15
16void f(A *a, B *b) {
17 [a method]; // expected-warning{{'method' is deprecated: first deprecated in Mac OS X 10.2}}
Fariborz Jahanian1ea67442012-06-05 21:14:46 +000018 [b method]; // expected-warning {{'method' is deprecated: first deprecated in Mac OS X 10.2}}
Fariborz Jahaniand6724362012-04-23 20:30:52 +000019 [a proto_method]; // expected-warning{{'proto_method' is deprecated: first deprecated in Mac OS X 10.2}}
20 [b proto_method]; // expected-warning{{'proto_method' is deprecated: first deprecated in Mac OS X 10.2}}
Douglas Gregorc193dd82011-09-23 20:23:42 +000021}