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