blob: ef226a515f1c0da112bef6f94ef90667e81fb581 [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
Chris Lattner5f4a6822008-11-23 23:12:31 +00007typedef int INTF; // expected-note {{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
Chris Lattner5f4a6822008-11-23 23:12:31 +000011@interface OBJECT @end // expected-note {{previous definition is here}}
Fariborz Jahanianccb4f312007-09-25 18:38:09 +000012
Chris Lattnerb8b96af2008-11-23 22:46:27 +000013@interface INTF1 : OBJECT @end // expected-note {{previous definition is here}}
Fariborz Jahanianccb4f312007-09-25 18:38:09 +000014
Chris Lattnerb8b96af2008-11-23 22:46:27 +000015@interface INTF1 : OBJECT @end // expected-error {{duplicate interface definition for class 'INTF1'}}
Fariborz Jahanianccb4f312007-09-25 18:38:09 +000016
Chris Lattner5f4a6822008-11-23 23:12:31 +000017typedef int OBJECT; // expected-note {{previous definition is here}} \
Fariborz Jahanianbe127ba2007-10-15 19:16:57 +000018 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