[Heikki Kultala] This patch contains the ABI changes for the TCE target.
[clang.git] / test / SemaObjC / undef-superclass-1.m
blobc941f82e435c9bc53af9ecb6b770f4909fa43e16
1 // RUN: %clang_cc1 -fsyntax-only -verify %s
3 @class SUPER, Y;
5 @interface INTF :SUPER  // expected-error {{cannot find interface declaration for 'SUPER', superclass of 'INTF'}}
6 @end
8 @interface SUPER @end
10 @interface INTF1 : SUPER  // expected-note {{previous definition is here}}
11 @end
13 @interface INTF2 : INTF1
14 @end
16 @interface INTF3 : Y // expected-error {{cannot find interface declaration for 'Y', superclass of 'INTF3'}} \
17                      // expected-note{{'INTF3' declared here}}
18 @end
20 @interface INTF1  // expected-error {{duplicate interface definition for class 'INTF1'}}
21 @end
23 @implementation SUPER
24 - (void)dealloc {
25     [super dealloc]; // expected-error {{'SUPER' cannot use 'super' because it is a root class}}
27 @end
29 @interface RecursiveClass : RecursiveClass // expected-error {{trying to recursively use 'RecursiveClass' as superclass of 'RecursiveClass'}}
30 @end
32 @implementation RecursiveClass
33 @end
35 @implementation iNTF3 // expected-warning{{cannot find interface declaration for 'iNTF3'; did you mean 'INTF3'?}}
36 @end