xref: /aosp_15_r20/external/clang/test/SemaObjC/warn-forward-class-attr-deprecated.m (revision 67e74705e28f6214e480b399dd47ea732279e315)
1*67e74705SXin Li// RUN: %clang_cc1 -fsyntax-only -verify -Wno-objc-root-class %s
2*67e74705SXin Li// rdar://10290322
3*67e74705SXin Li
4*67e74705SXin Li@class ABGroupImportFilesScope; // expected-note {{forward declaration of class here}}
5*67e74705SXin Li
6*67e74705SXin Li@interface I1
7*67e74705SXin Li- (id) filenames __attribute__((deprecated)); // expected-note {{'filenames' has been explicitly marked deprecated here}}
8*67e74705SXin Li@end
9*67e74705SXin Li
10*67e74705SXin Li@interface I2
11*67e74705SXin Li- (id) Meth : (ABGroupImportFilesScope*) scope;
12*67e74705SXin Li- (id) filenames __attribute__((deprecated));
13*67e74705SXin Li- (id)initWithAccount: (id)account filenames:(id)filenames;
14*67e74705SXin Li@end
15*67e74705SXin Li
16*67e74705SXin Li@implementation I2
17*67e74705SXin Li- (id) Meth : (ABGroupImportFilesScope*) scope
18*67e74705SXin Li{
19*67e74705SXin Li  id p =  [self initWithAccount : 0 filenames :[scope filenames]]; // expected-warning {{'filenames' may be deprecated because the receiver type is unknown}}
20*67e74705SXin Li  return 0;
21*67e74705SXin Li}
22*67e74705SXin Li- (id) filenames { return 0; }
23*67e74705SXin Li- (id)initWithAccount: (id)account filenames:(id)filenames { return 0; }
24*67e74705SXin Li@end
25