blob: 3dc687b99a6d8fb47dd724dc9d1b2720ef350e40 [file] [log] [blame]
Fariborz Jahanian4b6df3f2007-10-04 00:22:33 +00001// RUN: clang -fsyntax-only -verify %s
2
Fariborz Jahanianccb4f312007-09-25 18:38:09 +00003@protocol SUPER;
4
Chris Lattnereacc3922008-07-26 03:47:43 +00005@interface SUPER <SUPER> @end // expected-warning {{cannot find protocol definition for 'SUPER'}}
Fariborz Jahanianccb4f312007-09-25 18:38:09 +00006
Fariborz Jahanian4b6df3f2007-10-04 00:22:33 +00007typedef int INTF; // expected-error {{previous definition is here}}
Fariborz Jahanianccb4f312007-09-25 18:38:09 +00008
9@interface INTF @end // expected-error {{redefinition of 'INTF' as different kind of symbol}}
10
Fariborz Jahanianbe127ba2007-10-15 19:16:57 +000011@interface OBJECT @end // expected-error {{previous definition is here}}
Fariborz Jahanianccb4f312007-09-25 18:38:09 +000012
13@interface INTF1 : OBJECT @end
14
Bill Wendlingf5f20bd2007-11-26 08:26:20 +000015@interface INTF1 : OBJECT @end // expected-error {{duplicate interface declaration for class 'INTF1'}}
Fariborz Jahanianccb4f312007-09-25 18:38:09 +000016
Fariborz Jahanianbe127ba2007-10-15 19:16:57 +000017typedef int OBJECT; // expected-error {{previous definition is here}} \
18 expected-error {{redefinition of 'OBJECT' as different kind of symbol}}
Fariborz Jahanianccb4f312007-09-25 18:38:09 +000019
20@interface INTF2 : OBJECT @end // expected-error {{redefinition of 'OBJECT' as different kind of symbol}}
21
22
23@protocol PROTO;
24
25@interface INTF3 : PROTO @end // expected-error {{cannot find interface declaration for 'PROTO', superclass of 'INTF3'}}
26