87 lines · plain
1// RUN: %clang_cc1 -fobjc-runtime=macosx-fragile-10.5 -fsyntax-only -verify -Wno-objc-root-class %s2 3@interface INTF 4{5@public6 int IVAR; // expected-note {{previous definition is here}}7}8@end9 10@implementation INTF11{12@private13 14 int XIVAR; // expected-error {{conflicting instance variable names: 'XIVAR' vs 'IVAR'}}15}16@end17 18 19 20@interface INTF1 21{22@public23 int IVAR;24 int IVAR1; // expected-error {{inconsistent number of instance variables specified}}25}26@end27 28@implementation INTF129{30@private31 32 int IVAR;33}34@end35 36 37@interface INTF2 38{39@public40 int IVAR;41}42@end43 44@implementation INTF245{46@private47 48 int IVAR;49 int IVAR1; // expected-error {{inconsistent number of instance variables specified}}50}51@end52 53 54@interface INTF355{56@public57 int IVAR; // expected-note {{previous definition is here}}58}59@end60 61@implementation INTF362{63@private64 65 short IVAR; // expected-error {{instance variable 'IVAR' has conflicting type: 'short' vs 'int'}}66}67@end68 69@implementation INTF4 // expected-warning {{cannot find interface declaration for 'INTF4'}}70{71@private72 73 short IVAR;74}75@end76 77@interface INTF578{79 char * ch;80}81@end82 83@implementation INTF584{85}86@end87