Chris Lattner | 6ad7e88 | 2007-12-19 05:31:29 +0000 | [diff] [blame] | 1 | // RUN: clang %s -verify -fsyntax-only |
| 2 | typedef char T[4]; |
| 3 | |
| 4 | T foo(int n, int m) { } // expected-error {{cannot return array or function}} |
| 5 | |
Steve Naroff | aa43cc1 | 2008-01-17 00:36:28 +0000 | [diff] [blame] | 6 | void foof(const char *, ...) __attribute__((__format__(__printf__, 1, 2))), barf (void); |
| 7 | |
Steve Naroff | 8329885 | 2008-02-14 02:58:32 +0000 | [diff] [blame^] | 8 | int typedef validTypeDecl() { } // expected-error {{function definition declared 'typedef'}} |
| 9 | |
Steve Naroff | 3cd7fc3 | 2008-02-12 04:08:59 +0000 | [diff] [blame] | 10 | struct _zend_module_entry { } |
| 11 | typedef struct _zend_function_entry { } // expected-error {{cannot combine with previous 'struct' declaration specifier}} |
Steve Naroff | 8329885 | 2008-02-14 02:58:32 +0000 | [diff] [blame^] | 12 | static void buggy(int *x) { } // expected-error {{function definition declared 'typedef'}} \ |
| 13 | // expected-error {{cannot combine with previous 'typedef' declaration specifier}} \ |
| 14 | // expected-error {{cannot combine with previous 'struct' declaration specifier}} |
| 15 | |
| 16 | |