blob: a5e7ad3b1ec1dd62dd611add9437cd88496a6ce3 [file] [log] [blame]
Daniel Dunbara5728872009-12-15 20:14:24 +00001// RUN: %clang_cc1 %s -fsyntax-only -verify
Chris Lattner9a11b9a2007-10-19 20:10:30 +00002
3void test() {
Chris Lattner1f6f54b2008-11-11 06:13:16 +00004 char = 4; // expected-error {{expected identifier}}
Chris Lattner9a11b9a2007-10-19 20:10:30 +00005}
6
7
Chris Lattner8389eab2008-08-09 21:35:13 +00008// PR2400
Douglas Gregor58408bc2010-01-11 18:46:21 +00009typedef xtype (*x)(void* handle); // expected-error {{function cannot return function type}} expected-warning {{type specifier missing, defaults to 'int'}} expected-warning {{type specifier missing, defaults to 'int'}}
Chris Lattnereaaebc72009-04-25 08:06:05 +000010
11typedef void ytype();
12
Chris Lattner8389eab2008-08-09 21:35:13 +000013
14typedef struct _zend_module_entry zend_module_entry;
15struct _zend_module_entry {
Chris Lattnereaaebc72009-04-25 08:06:05 +000016 ytype globals_size; // expected-error {{field 'globals_size' declared as a function}}
Chris Lattner8389eab2008-08-09 21:35:13 +000017};
18
19zend_module_entry openssl_module_entry = {
20 sizeof(zend_module_entry)
21};
22