Patrick Beard | b2f6820 | 2012-04-06 18:12:22 +0000 | [diff] [blame] | 1 | // RUN: %clang_cc1 -fsyntax-only -verify -Wno-objc-root-class %s |
Fariborz Jahanian | b0a6615 | 2012-03-02 21:50:02 +0000 | [diff] [blame] | 2 | // rdar://10290322 |
| 3 | |
| 4 | @class ABGroupImportFilesScope; // expected-note {{forward declaration of class here}} |
| 5 | |
| 6 | @interface I1 |
Stephen Hines | 651f13c | 2014-04-23 16:59:28 -0700 | [diff] [blame] | 7 | - (id) filenames __attribute__((deprecated)); // expected-note {{'filenames' has been explicitly marked deprecated here}} |
Fariborz Jahanian | b0a6615 | 2012-03-02 21:50:02 +0000 | [diff] [blame] | 8 | @end |
| 9 | |
| 10 | @interface I2 |
| 11 | - (id) Meth : (ABGroupImportFilesScope*) scope; |
| 12 | - (id) filenames __attribute__((deprecated)); |
| 13 | - (id)initWithAccount: (id)account filenames:(id)filenames; |
| 14 | @end |
| 15 | |
| 16 | @implementation I2 |
| 17 | - (id) Meth : (ABGroupImportFilesScope*) scope |
| 18 | { |
Stephen Hines | 651f13c | 2014-04-23 16:59:28 -0700 | [diff] [blame] | 19 | id p = [self initWithAccount : 0 filenames :[scope filenames]]; // expected-warning {{'filenames' may be deprecated because the receiver type is unknown}} |
Fariborz Jahanian | b0a6615 | 2012-03-02 21:50:02 +0000 | [diff] [blame] | 20 | return 0; |
| 21 | } |
| 22 | - (id) filenames { return 0; } |
| 23 | - (id)initWithAccount: (id)account filenames:(id)filenames { return 0; } |
| 24 | @end |