xref: /third_party/ltp/tools/sparse/sparse-src/validation/range-syntax.c (revision f08c3bdf)
  • Home
  • History
  • Annotate Annotate
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
  • only in /third_party/ltp/tools/sparse/sparse-src/validation/
1f08c3bdfSopenharmony_ci
2f08c3bdfSopenharmony_cistatic void ok(int a, int b, int c)
3f08c3bdfSopenharmony_ci{
4f08c3bdfSopenharmony_ci	__range__(a, 0, 8);
5f08c3bdfSopenharmony_ci	__range__(a, b, c);
6f08c3bdfSopenharmony_ci}
7f08c3bdfSopenharmony_ci
8f08c3bdfSopenharmony_cistatic void ko(int a, int b, int c)
9f08c3bdfSopenharmony_ci{
10f08c3bdfSopenharmony_ci	__range__ a, 0, 8;
11f08c3bdfSopenharmony_ci	__range__ a, b, c;
12f08c3bdfSopenharmony_ci}
13f08c3bdfSopenharmony_ci
14f08c3bdfSopenharmony_ci/*
15f08c3bdfSopenharmony_ci * check-name: range syntax
16f08c3bdfSopenharmony_ci *
17f08c3bdfSopenharmony_ci * check-error-start
18f08c3bdfSopenharmony_cirange-syntax.c:10:19: error: Expected ( after __range__ statement
19f08c3bdfSopenharmony_cirange-syntax.c:10:19: error: got a
20f08c3bdfSopenharmony_cirange-syntax.c:11:19: error: Expected ( after __range__ statement
21f08c3bdfSopenharmony_cirange-syntax.c:11:19: error: got a
22f08c3bdfSopenharmony_ci * check-error-end
23f08c3bdfSopenharmony_ci */
24

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