Douglas Gregor | 710e0c4 | 2011-09-23 20:28:32 +0000 | [diff] [blame] | 1 | // RUN: %clang_cc1 -triple x86_64-apple-darwin9.0.0 -fsyntax-only -verify %s |
Fariborz Jahanian | d672436 | 2012-04-23 20:30:52 +0000 | [diff] [blame] | 2 | |
| 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 Gregor | c193dd8 | 2011-09-23 20:23:42 +0000 | [diff] [blame] | 9 | @end |
| 10 | |
| 11 | @interface B : A |
| 12 | - (void)method; |
| 13 | @end |
| 14 | |
| 15 | void 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 Jahanian | d672436 | 2012-04-23 20:30:52 +0000 | [diff] [blame] | 18 | [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 Gregor | c193dd8 | 2011-09-23 20:23:42 +0000 | [diff] [blame] | 20 | } |