xref: /third_party/ltp/tools/sparse/sparse-src/validation/inline_compound_literals.c
  • Home
  • History
  • Annotate Annotate
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
  • only in /third_party/ltp/tools/sparse/sparse-src/validation/
1f08c3bdfSopenharmony_cistruct foo {
2f08c3bdfSopenharmony_ci	int x;
3f08c3bdfSopenharmony_ci};
4f08c3bdfSopenharmony_ci
5f08c3bdfSopenharmony_cistatic inline void baz(void)
6f08c3bdfSopenharmony_ci{
7f08c3bdfSopenharmony_ci	(struct foo) { .x = 0 };
8f08c3bdfSopenharmony_ci}
9f08c3bdfSopenharmony_ci
10f08c3bdfSopenharmony_cistatic void barf(void)
11f08c3bdfSopenharmony_ci{
12f08c3bdfSopenharmony_ci	baz();
13f08c3bdfSopenharmony_ci}
14f08c3bdfSopenharmony_ci
15f08c3bdfSopenharmony_cistatic void foo(void)
16f08c3bdfSopenharmony_ci{
17f08c3bdfSopenharmony_ci	baz();
18f08c3bdfSopenharmony_ci}
19f08c3bdfSopenharmony_ci
20f08c3bdfSopenharmony_ci/*
21f08c3bdfSopenharmony_ci * check-name: inline compound literals
22f08c3bdfSopenharmony_ci */
23

Indexes created Thu Nov 07 10:32:03 CST 2024