brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.3 KiB · d634002 Raw
49 lines · c
1// RUN: %clang_cc1 %s -fsyntax-only -Wno-strict-prototypes -verify2 3void test(void) {4    char = 4;  // expected-error {{expected identifier}}5}6 7 8// PR24009typedef xtype (*x)(void* handle); // expected-error {{function cannot return function type}} expected-error 2{{type specifier missing, defaults to 'int'}}10 11typedef void ytype();12 13 14typedef struct _zend_module_entry zend_module_entry;15struct _zend_module_entry {16    ytype globals_size; // expected-error {{field 'globals_size' declared as a function}}17};18 19zend_module_entry openssl_module_entry = {20    sizeof(zend_module_entry)21};22 23typedef int (FunctionType)(int *value);24typedef struct {25  UndefinedType undef; // expected-error {{unknown type name 'UndefinedType'}}26  FunctionType fun; // expected-error {{field 'fun' declared as a function}}27} StructType;28void f(StructType *buf) {29  buf->fun = 0;30}31 32static void bar(hid_t, char); // expected-error {{expected identifier}}33 34static void bar(hid_t p, char); // expected-error {{unknown type name 'hid_t'}}35 36void foo(void) {37  (void)bar;38}39 40void test2();41void test2(undef); // expected-error {{a parameter list without types is only allowed in a function definition}}42void test2() { }43 44void test3();45void test3; // expected-error {{incomplete type}}46void test3() { }47 48void ellipsis1(...); // expected-error {{ISO C requires a named parameter before '...'}}49