blob: cb118c3caf4bfecae27bf9229384b8576fa7e36e [file] [log] [blame]
Patrick Beardb2f68202012-04-06 18:12:22 +00001// RUN: %clang_cc1 -fsyntax-only -verify -Wno-objc-root-class %s
Fariborz Jahanianb0a66152012-03-02 21:50:02 +00002// rdar://10290322
3
4@class ABGroupImportFilesScope; // expected-note {{forward declaration of class here}}
5
6@interface I1
Stephen Hines651f13c2014-04-23 16:59:28 -07007- (id) filenames __attribute__((deprecated)); // expected-note {{'filenames' has been explicitly marked deprecated here}}
Fariborz Jahanianb0a66152012-03-02 21:50:02 +00008@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 Hines651f13c2014-04-23 16:59:28 -070019 id p = [self initWithAccount : 0 filenames :[scope filenames]]; // expected-warning {{'filenames' may be deprecated because the receiver type is unknown}}
Fariborz Jahanianb0a66152012-03-02 21:50:02 +000020 return 0;
21}
22- (id) filenames { return 0; }
23- (id)initWithAccount: (id)account filenames:(id)filenames { return 0; }
24@end