xref: /aosp_15_r20/external/clang/test/SemaObjC/no-ivar-in-interface-block.m (revision 67e74705e28f6214e480b399dd47ea732279e315)
1*67e74705SXin Li// RUN: %clang_cc1  -fsyntax-only -verify -Wno-objc-root-class -Wobjc-interface-ivars %s
2*67e74705SXin Li// rdar://10763173
3*67e74705SXin Li
4*67e74705SXin Li@interface I
5*67e74705SXin Li{
6*67e74705SXin Li  @protected  int P_IVAR; // expected-warning {{declaration of instance variables in the interface is deprecated}}
7*67e74705SXin Li
8*67e74705SXin Li  @public     int PU_IVAR; // expected-warning {{declaration of instance variables in the interface is deprecated}}
9*67e74705SXin Li
10*67e74705SXin Li  @private    int PRV_IVAR; // expected-warning {{declaration of instance variables in the interface is deprecated}}
11*67e74705SXin Li}
12*67e74705SXin Li@end
13*67e74705SXin Li
14*67e74705SXin Li@interface I()
15*67e74705SXin Li{
16*67e74705SXin Li  int I1;
17*67e74705SXin Li  int I2;
18*67e74705SXin Li}
19*67e74705SXin Li@end
20*67e74705SXin Li
21*67e74705SXin Li@interface I()
22*67e74705SXin Li{
23*67e74705SXin Li  int I3, I4;
24*67e74705SXin Li}
25*67e74705SXin Li@end
26*67e74705SXin Li
27*67e74705SXin Li@implementation I
28*67e74705SXin Li{
29*67e74705SXin Li  int I5;
30*67e74705SXin Li  int I6;
31*67e74705SXin Li}
32*67e74705SXin Li@end
33