Fariborz Jahanian | be127ba | 2007-10-15 19:16:57 +0000 | [diff] [blame^] | 1 | // RUN: clang -fsyntax-only -verify %s |
| 2 | |
| 3 | @interface Foo // expected-error {{previous definition is here}} |
| 4 | @end |
| 5 | |
| 6 | float Foo; // expected-error {{redefinition of 'Foo' as different kind of symbol}} |
| 7 | |
| 8 | @class Bar; // expected-error {{previous definition is here}} |
| 9 | |
| 10 | typedef int Bar; // expected-error {{redefinition of 'Bar' as different kind of symbol}} |
| 11 | |
| 12 | @implementation FooBar // expected-warning {{cannot find interface declaration for 'FooBar'}} |
| 13 | @end |
| 14 | |
| 15 | |
| 16 | typedef int OBJECT; // expected-error {{previous definition is here}} |
| 17 | |
| 18 | @class OBJECT ; // expected-error {{redefinition of 'OBJECT' as different kind of symbol}} |
| 19 | |
| 20 | |
| 21 | typedef int Gorf; // expected-error {{previous definition is here}} |
| 22 | |
| 23 | @interface Gorf @end // expected-error {{redefinition of 'Gorf' as different kind of symbol}} \ |
| 24 | // expected-error {{previous definition is here}} |
| 25 | |
| 26 | void Gorf() // expected-error {{redefinition of 'Gorf' as different kind of symbol}} |
| 27 | { |
| 28 | int Bar, Foo, FooBar; |
| 29 | } |