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 | |
Fariborz Jahanian | 1ea6744 | 2012-06-05 21:14:46 +0000 | [diff] [blame] | 11 | // rdar://11475360 |
Douglas Gregor | c193dd8 | 2011-09-23 20:23:42 +0000 | [diff] [blame] | 12 | @interface B : A |
Fariborz Jahanian | 1ea6744 | 2012-06-05 21:14:46 +0000 | [diff] [blame] | 13 | - (void)method; // expected-note {{method 'method' declared here}} |
Douglas Gregor | c193dd8 | 2011-09-23 20:23:42 +0000 | [diff] [blame] | 14 | @end |
| 15 | |
| 16 | void f(A *a, B *b) { |
Fariborz Jahanian | faab561 | 2012-10-01 18:42:25 +0000 | [diff] [blame] | 17 | [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 Gregor | c193dd8 | 2011-09-23 20:23:42 +0000 | [diff] [blame] | 21 | } |