2012-04-07 02:12:22 +08:00
|
|
|
// RUN: %clang_cc1 -fsyntax-only -verify -Wno-objc-root-class %s
|
2007-10-04 08:22:33 +08:00
|
|
|
|
2008-11-24 07:12:31 +08:00
|
|
|
typedef int INTF3; // expected-note {{previous definition is here}}
|
2007-09-26 02:38:09 +08:00
|
|
|
|
2008-11-24 07:12:31 +08:00
|
|
|
@interface SUPER @end // expected-note {{previous definition is here}}
|
2007-09-26 02:38:09 +08:00
|
|
|
|
|
|
|
@interface OBJECT @end
|
|
|
|
|
|
|
|
@interface INTF : OBJECT
|
|
|
|
@end
|
|
|
|
|
2009-07-21 08:06:04 +08:00
|
|
|
@implementation INTF @end // expected-note {{previous definition is here}}
|
2007-09-26 02:38:09 +08:00
|
|
|
|
|
|
|
@implementation INTF // expected-error {{reimplementation of class 'INTF'}}
|
|
|
|
@end
|
|
|
|
|
|
|
|
|
|
|
|
@interface INTF1 : OBJECT
|
|
|
|
@end
|
|
|
|
|
|
|
|
@implementation INTF1 : SUPER // expected-error {{conflicting super class name 'SUPER'}}
|
|
|
|
@end
|
|
|
|
|
|
|
|
@interface INTF2
|
|
|
|
@end
|
|
|
|
|
|
|
|
@implementation INTF2 : SUPR // expected-error {{cannot find interface declaration for 'SUPR', superclass of 'INTF2'}}
|
|
|
|
@end
|
|
|
|
|
|
|
|
@implementation INTF3 @end // expected-error {{redefinition of 'INTF3' as different kind of symbol}}
|
|
|
|
|
|
|
|
@implementation INTF4 @end // expected-warning {{cannot find interface declaration for 'INTF4'}}
|
|
|
|
|
2011-11-15 06:10:01 +08:00
|
|
|
@class INTF5; // expected-note{{forward declaration of class here}}
|
2009-04-24 05:49:04 +08:00
|
|
|
|
|
|
|
@implementation INTF5 { // expected-warning {{cannot find interface declaration for 'INTF5'}}
|
|
|
|
int x;
|
|
|
|
}
|
|
|
|
@end
|
|
|
|
|