annotate clang/test/Sema/invalid-struct-init.c @ 207:2e18cbf3894f

LLVM12
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Tue, 08 Jun 2021 06:07:14 +0900
parents 1d019706d866
children c4bab56944e8
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
150
anatofuz
parents:
diff changeset
1 // RUN: %clang_cc1 %s -verify -fsyntax-only
anatofuz
parents:
diff changeset
2
anatofuz
parents:
diff changeset
3 typedef struct _zend_module_entry zend_module_entry;
anatofuz
parents:
diff changeset
4 struct _zend_module_entry {
anatofuz
parents:
diff changeset
5 _efree((p)); // expected-error{{type name requires a specifier or qualifier}} \
anatofuz
parents:
diff changeset
6 expected-warning {{type specifier missing, defaults to 'int'}}
anatofuz
parents:
diff changeset
7
anatofuz
parents:
diff changeset
8 };
anatofuz
parents:
diff changeset
9 typedef struct _zend_function_entry { } zend_function_entry;
anatofuz
parents:
diff changeset
10 typedef struct _zend_pcre_globals { } zend_pcre_globals;
anatofuz
parents:
diff changeset
11 zend_pcre_globals pcre_globals;
anatofuz
parents:
diff changeset
12
anatofuz
parents:
diff changeset
13 static void zm_globals_ctor_pcre(zend_pcre_globals *pcre_globals ) { }
anatofuz
parents:
diff changeset
14 static void zm_globals_dtor_pcre(zend_pcre_globals *pcre_globals ) { }
anatofuz
parents:
diff changeset
15 static void zm_info_pcre(zend_module_entry *zend_module ) { }
anatofuz
parents:
diff changeset
16 static int zm_startup_pcre(int type, int module_number ) { }
anatofuz
parents:
diff changeset
17
anatofuz
parents:
diff changeset
18 static int zm_shutdown_pcre(int type, int module_number ) {
anatofuz
parents:
diff changeset
19 zend_function_entry pcre_functions[] = {{ }; // expected-error{{expected '}'}} expected-note {{to match this '{'}}
anatofuz
parents:
diff changeset
20 zend_module_entry pcre_module_entry = {
anatofuz
parents:
diff changeset
21 sizeof(zend_module_entry), 20071006, 0, 0, ((void *)0), ((void *)0),
anatofuz
parents:
diff changeset
22 "pcre", pcre_functions, zm_startup_pcre, zm_shutdown_pcre, ((void *)0),
anatofuz
parents:
diff changeset
23 ((void *)0), zm_info_pcre, ((void *)0), sizeof(zend_pcre_globals), &pcre_globals,
anatofuz
parents:
diff changeset
24 ((void (*)(void* ))(zm_globals_ctor_pcre)), ((void (*)(void* ))(zm_globals_dtor_pcre)),
anatofuz
parents:
diff changeset
25 ((void *)0), 0, 0, ((void *)0), 0
anatofuz
parents:
diff changeset
26 };
anatofuz
parents:
diff changeset
27 }