xref: /third_party/ltp/tools/sparse/sparse-src/validation/linear/inline-definition.c
  • Home
  • History
  • Annotate Annotate
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
  • only in /third_party/ltp/tools/sparse/sparse-src/validation/linear/
1f08c3bdfSopenharmony_ciextern void use(void *);
2f08c3bdfSopenharmony_ci
3f08c3bdfSopenharmony_cistatic inline int inl0(int a);
4f08c3bdfSopenharmony_cistatic inline int inl1(int a);
5f08c3bdfSopenharmony_ci
6f08c3bdfSopenharmony_cistatic inline int inl0(int a)
7f08c3bdfSopenharmony_ci{
8f08c3bdfSopenharmony_ci	return a;
9f08c3bdfSopenharmony_ci}
10f08c3bdfSopenharmony_ci
11f08c3bdfSopenharmony_civoid foo(void)
12f08c3bdfSopenharmony_ci{
13f08c3bdfSopenharmony_ci	use(inl0);
14f08c3bdfSopenharmony_ci	use(inl1);
15f08c3bdfSopenharmony_ci}
16f08c3bdfSopenharmony_ci
17f08c3bdfSopenharmony_cistatic inline int inl1(int a)
18f08c3bdfSopenharmony_ci{
19f08c3bdfSopenharmony_ci	return a;
20f08c3bdfSopenharmony_ci}
21f08c3bdfSopenharmony_ci
22f08c3bdfSopenharmony_ci/*
23f08c3bdfSopenharmony_ci * check-name: inline-definition
24f08c3bdfSopenharmony_ci * check-command: test-linearize -Wno-decl $file
25f08c3bdfSopenharmony_ci * check-known-to-fail
26f08c3bdfSopenharmony_ci *
27f08c3bdfSopenharmony_ci * check-output-ignore
28f08c3bdfSopenharmony_ci * check-output-contains: inl0:
29f08c3bdfSopenharmony_ci * check-output-contains: inl1:
30f08c3bdfSopenharmony_ci */
31

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