blob: ed6b7608b9a42ca048d4609e192309f93b2804f2 [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) {
Fariborz Jahanianfaab5612012-10-01 18:42:25 +000017 [a method]; // expected-warning{{'method' is deprecated: first deprecated in OS X 10.2}}
18 [b method]; // expected-warning {{'method' is deprecated: first deprecated in OS X 10.2}}
19 [a proto_method]; // expected-warning{{'proto_method' is deprecated: first deprecated in OS X 10.2}}
20 [b proto_method]; // expected-warning{{'proto_method' is deprecated: first deprecated in OS X 10.2}}
Douglas Gregorc193dd82011-09-23 20:23:42 +000021}