blob: 405cfbb98f74c2c003ca7075ac07c7391d1488ca [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
11@interface B : A
12- (void)method;
13@end
14
15void f(A *a, B *b) {
16 [a method]; // expected-warning{{'method' is deprecated: first deprecated in Mac OS X 10.2}}
17 [b method];
Fariborz Jahaniand6724362012-04-23 20:30:52 +000018 [a proto_method]; // expected-warning{{'proto_method' is deprecated: first deprecated in Mac OS X 10.2}}
19 [b proto_method]; // expected-warning{{'proto_method' is deprecated: first deprecated in Mac OS X 10.2}}
Douglas Gregorc193dd82011-09-23 20:23:42 +000020}