1 | // RUN: %clang_cc1 -fsyntax-only -verify -Wno-objc-root-class %s |
2 | |
3 | typedef int INTF3; // expected-note {{previous definition is here}} |
4 | |
5 | @interface SUPER @end // expected-note {{previous definition is here}} |
6 | |
7 | @interface OBJECT @end |
8 | |
9 | @interface INTF : OBJECT |
10 | @end |
11 | |
12 | @implementation INTF @end // expected-note {{previous definition is here}} |
13 | |
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 | |
34 | @class INTF5; // expected-note{{forward declaration of class here}} |
35 | |
36 | @implementation INTF5 { // expected-warning {{cannot find interface declaration for 'INTF5'}} |
37 | int x; |
38 | } |
39 | @end |
40 | |
41 | |