Debian Codegraph @

clang/test/SemaObjC/warn-forward-class-attr-deprecated.m

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