2007-12-19 13:31:29 +08:00
|
|
|
// RUN: clang %s -verify -fsyntax-only
|
|
|
|
typedef char T[4];
|
|
|
|
|
|
|
|
T foo(int n, int m) { } // expected-error {{cannot return array or function}}
|
|
|
|
|
2008-01-17 08:36:28 +08:00
|
|
|
void foof(const char *, ...) __attribute__((__format__(__printf__, 1, 2))), barf (void);
|
|
|
|
|
2008-02-14 10:58:32 +08:00
|
|
|
int typedef validTypeDecl() { } // expected-error {{function definition declared 'typedef'}}
|
|
|
|
|
2008-02-12 12:08:59 +08:00
|
|
|
struct _zend_module_entry { }
|
|
|
|
typedef struct _zend_function_entry { } // expected-error {{cannot combine with previous 'struct' declaration specifier}}
|
2008-02-14 10:58:32 +08:00
|
|
|
static void buggy(int *x) { } // expected-error {{function definition declared 'typedef'}} \
|
|
|
|
// expected-error {{cannot combine with previous 'typedef' declaration specifier}} \
|
|
|
|
// expected-error {{cannot combine with previous 'struct' declaration specifier}}
|
|
|
|
|
|
|
|
|