Add an assert for safety check.
[clang.git] / test / SemaObjC / class-impl-1.m
blob09ad1556c035dd5ef1ab2e3f5c206cb2ef373161
1 // RUN: clang-cc -fsyntax-only -verify %s
3 typedef int INTF3; // expected-note {{previous definition is here}}
5 @interface SUPER @end // expected-note {{previous definition is here}}
7 @interface OBJECT @end
9 @interface INTF  : OBJECT
10 @end
12 @implementation INTF @end // expected-note {{previous definition is here}}
14 @implementation INTF //  expected-error {{reimplementation of class 'INTF'}}
15 @end
18 @interface INTF1 : OBJECT
19 @end
21 @implementation INTF1 : SUPER // expected-error {{conflicting super class name 'SUPER'}}
22 @end
24 @interface INTF2 
25 @end
27 @implementation INTF2 : SUPR //  expected-error {{cannot find interface declaration for 'SUPR', superclass of 'INTF2'}}
28 @end
30 @implementation INTF3 @end // expected-error {{redefinition of 'INTF3' as different kind of symbol}}
32 @implementation INTF4 @end // expected-warning {{cannot find interface declaration for 'INTF4'}}
34 @class INTF5;
36 @implementation INTF5 {  // expected-warning {{cannot find interface declaration for 'INTF5'}}
37   int x;
39 @end