blob: e262b343cbb9856f45349005b3e256c8320bdbfc [file] [log] [blame]
Chris Lattner6ad7e882007-12-19 05:31:29 +00001// RUN: clang %s -verify -fsyntax-only
2typedef char T[4];
3
4T foo(int n, int m) { } // expected-error {{cannot return array or function}}
5
Steve Naroffaa43cc12008-01-17 00:36:28 +00006void foof(const char *, ...) __attribute__((__format__(__printf__, 1, 2))), barf (void);
7
Steve Naroff83298852008-02-14 02:58:32 +00008int typedef validTypeDecl() { } // expected-error {{function definition declared 'typedef'}}
9
Steve Naroff3cd7fc32008-02-12 04:08:59 +000010struct _zend_module_entry { }
11typedef struct _zend_function_entry { } // expected-error {{cannot combine with previous 'struct' declaration specifier}}
Steve Naroff83298852008-02-14 02:58:32 +000012static 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