Daniel Dunbar | a572887 | 2009-12-15 20:14:24 +0000 | [diff] [blame] | 1 | // RUN: %clang_cc1 -fsyntax-only -verify %s |
Fariborz Jahanian | 4b6df3f | 2007-10-04 00:22:33 +0000 | [diff] [blame] | 2 | |
Douglas Gregor | 4ec339f | 2009-01-19 19:26:10 +0000 | [diff] [blame] | 3 | struct S; // expected-note{{forward declaration of 'struct S'}} |
Fariborz Jahanian | e267ab6 | 2007-09-14 16:27:55 +0000 | [diff] [blame] | 4 | typedef int FOO(); |
| 5 | |
| 6 | @interface INTF |
| 7 | { |
| 8 | struct F {} JJ; |
Douglas Gregor | 4ec339f | 2009-01-19 19:26:10 +0000 | [diff] [blame] | 9 | int arr[]; // expected-error {{field has incomplete type}} |
| 10 | struct S IC; // expected-error {{field has incomplete type}} |
Chris Lattner | 5f4a682 | 2008-11-23 23:12:31 +0000 | [diff] [blame] | 11 | struct T { // expected-note {{previous definition is here}} |
Rafael Espindola | 0162070 | 2010-03-21 22:56:43 +0000 | [diff] [blame] | 12 | struct T {} X; // expected-error {{nested redefinition of 'T'}} |
Fariborz Jahanian | 4b6df3f | 2007-10-04 00:22:33 +0000 | [diff] [blame] | 13 | }YYY; |
Fariborz Jahanian | e267ab6 | 2007-09-14 16:27:55 +0000 | [diff] [blame] | 14 | FOO BADFUNC; // expected-error {{field 'BADFUNC' declared as a function}} |
Douglas Gregor | 72de667 | 2009-01-08 20:45:30 +0000 | [diff] [blame] | 15 | int kaka; // expected-note {{previous declaration is here}} |
Fariborz Jahanian | e267ab6 | 2007-09-14 16:27:55 +0000 | [diff] [blame] | 16 | int kaka; // expected-error {{duplicate member 'kaka'}} |
Douglas Gregor | 4ec339f | 2009-01-19 19:26:10 +0000 | [diff] [blame] | 17 | char ch[]; // expected-error {{field has incomplete type}} |
Fariborz Jahanian | e267ab6 | 2007-09-14 16:27:55 +0000 | [diff] [blame] | 18 | } |
| 19 | @end |