2011-10-02 09:16:38 +08:00
|
|
|
// RUN: %clang_cc1 -fobjc-fragile-abi -fsyntax-only -verify %s
|
2007-10-04 08:22:33 +08:00
|
|
|
|
2007-09-27 02:27:25 +08:00
|
|
|
@interface INTF
|
|
|
|
{
|
|
|
|
@public
|
2008-11-24 07:12:31 +08:00
|
|
|
int IVAR; // expected-note {{previous definition is here}}
|
2007-09-27 02:27:25 +08:00
|
|
|
}
|
|
|
|
@end
|
|
|
|
|
|
|
|
@implementation INTF
|
|
|
|
{
|
|
|
|
@private
|
|
|
|
|
2008-11-24 05:45:46 +08:00
|
|
|
int XIVAR; // expected-error {{conflicting instance variable names: 'XIVAR' vs 'IVAR'}}
|
2007-09-27 02:27:25 +08:00
|
|
|
}
|
|
|
|
@end
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@interface INTF1
|
|
|
|
{
|
|
|
|
@public
|
|
|
|
int IVAR;
|
2007-12-13 08:16:34 +08:00
|
|
|
int IVAR1; // expected-error {{inconsistent number of instance variables specified}}
|
2007-09-27 02:27:25 +08:00
|
|
|
}
|
|
|
|
@end
|
|
|
|
|
|
|
|
@implementation INTF1
|
|
|
|
{
|
|
|
|
@private
|
|
|
|
|
|
|
|
int IVAR;
|
|
|
|
}
|
|
|
|
@end
|
|
|
|
|
|
|
|
|
|
|
|
@interface INTF2
|
|
|
|
{
|
|
|
|
@public
|
|
|
|
int IVAR;
|
|
|
|
}
|
|
|
|
@end
|
|
|
|
|
|
|
|
@implementation INTF2
|
|
|
|
{
|
|
|
|
@private
|
|
|
|
|
|
|
|
int IVAR;
|
2007-12-13 08:16:34 +08:00
|
|
|
int IVAR1; // expected-error {{inconsistent number of instance variables specified}}
|
2007-09-27 02:27:25 +08:00
|
|
|
}
|
|
|
|
@end
|
|
|
|
|
|
|
|
|
|
|
|
@interface INTF3
|
|
|
|
{
|
|
|
|
@public
|
2008-11-24 07:12:31 +08:00
|
|
|
int IVAR; // expected-note {{previous definition is here}}
|
2007-09-27 02:27:25 +08:00
|
|
|
}
|
|
|
|
@end
|
|
|
|
|
|
|
|
@implementation INTF3
|
|
|
|
{
|
|
|
|
@private
|
|
|
|
|
2008-11-24 05:45:46 +08:00
|
|
|
short IVAR; // expected-error {{instance variable 'IVAR' has conflicting type: 'short' vs 'int'}}
|
2007-09-27 02:27:25 +08:00
|
|
|
}
|
|
|
|
@end
|
|
|
|
|
|
|
|
@implementation INTF4 // expected-warning {{cannot find interface declaration for 'INTF4'}}
|
|
|
|
{
|
|
|
|
@private
|
|
|
|
|
|
|
|
short IVAR;
|
|
|
|
}
|
|
|
|
@end
|
|
|
|
|
|
|
|
@interface INTF5
|
|
|
|
{
|
|
|
|
char * ch;
|
|
|
|
}
|
|
|
|
@end
|
|
|
|
|
|
|
|
@implementation INTF5
|
|
|
|
{
|
|
|
|
}
|
|
|
|
@end
|