Files
llvm-project/clang/test/Sema/invalid-decl.c
Chris Lattner 572100b648 Fix PR2400 by more graceful handling of invalid decls. Don't try to layout
an invalid struct decl.  Thanks to Martin Doucha for the 
isIncompleteArrayType part of this patch.

llvm-svn: 54592
2008-08-09 21:35:13 +00:00

21 lines
552 B
C

// RUN: clang %s -fsyntax-only -verify
void test() {
char = 4; // expected-error {{expected identifier}} expected-error{{declarator requires an identifier}}
}
// PR2400
typedef xtype (*zend_stream_fsizer_t)(void* handle); // expected-error {{function cannot return array or function type}}
typedef struct _zend_module_entry zend_module_entry;
struct _zend_module_entry {
xtype globals_size; // expected-error {{field 'globals_size' declared as a function}}
};
zend_module_entry openssl_module_entry = {
sizeof(zend_module_entry)
};