blob: 68becaf0ac87ee0f85797e7726417bb5413647b9 [file] [log] [blame]
Patrick Beardb2f68202012-04-06 18:12:22 +00001// RUN: %clang_cc1 -fsyntax-only -verify -Wno-objc-root-class %s
Fariborz Jahanian4b6df3f2007-10-04 00:22:33 +00002
Chris Lattner5f4a6822008-11-23 23:12:31 +00003typedef int INTF3; // expected-note {{previous definition is here}}
Fariborz Jahanianccb4f312007-09-25 18:38:09 +00004
Chris Lattner5f4a6822008-11-23 23:12:31 +00005@interface SUPER @end // expected-note {{previous definition is here}}
Fariborz Jahanianccb4f312007-09-25 18:38:09 +00006
7@interface OBJECT @end
8
9@interface INTF : OBJECT
10@end
11
Argyrios Kyrtzidis87018772009-07-21 00:06:04 +000012@implementation INTF @end // expected-note {{previous definition is here}}
Fariborz Jahanianccb4f312007-09-25 18:38:09 +000013
14@implementation INTF // expected-error {{reimplementation of class 'INTF'}}
15@end
16
17
18@interface INTF1 : OBJECT
19@end
20
21@implementation INTF1 : SUPER // expected-error {{conflicting super class name 'SUPER'}}
22@end
23
24@interface INTF2
25@end
26
27@implementation INTF2 : SUPR // expected-error {{cannot find interface declaration for 'SUPR', superclass of 'INTF2'}}
28@end
29
30@implementation INTF3 @end // expected-error {{redefinition of 'INTF3' as different kind of symbol}}
31
32@implementation INTF4 @end // expected-warning {{cannot find interface declaration for 'INTF4'}}
33
Douglas Gregorb3029962011-11-14 22:10:01 +000034@class INTF5; // expected-note{{forward declaration of class here}}
Fariborz Jahanian77a6be42009-04-23 21:49:04 +000035
36@implementation INTF5 { // expected-warning {{cannot find interface declaration for 'INTF5'}}
37 int x;
38}
39@end
40