declspec.c revision e39bfd0c52975dfb038413aa55147df2fc709ce2
1// 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
6void foof(const char *, ...) __attribute__((__format__(__printf__, 1, 2))), barf (void);
7
8int typedef validTypeDecl() { } // expected-error {{function definition declared 'typedef'}}
9
10struct _zend_module_entry { }
11typedef struct _zend_function_entry { } // expected-error {{cannot combine with previous 'struct' declaration specifier}}
12static 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
17