validation/sm_null_deref.c: update test
[smatch.git] / validation / sm_compare.c
blob6f252ceeb8a7640ac5ea10c2c0bdc22b8b3c409f
1 #include "check_debug.h"
3 int a, b, c;
5 static int frob(void)
7 if (a > 5)
8 return;
9 if (b > 5)
10 return;
11 if (c != 5)
12 return;
14 if (a == 10)
15 __smatch_value("a");
16 if (b != 10)
17 __smatch_value("b");
18 if (c != 5)
19 __smatch_value("c");
20 if (5 != c)
21 __smatch_value("c");
23 __smatch_value("a");
24 __smatch_value("b");
25 __smatch_value("c");
29 * check-name: Smatch Comparison
30 * check-command: smatch -I.. sm_compare.c
32 * check-output-start
33 sm_compare.c:15 frob() a = empty
34 sm_compare.c:17 frob() b = s32min-5
35 sm_compare.c:19 frob() c = empty
36 sm_compare.c:21 frob() c = empty
37 sm_compare.c:23 frob() a = s32min-5
38 sm_compare.c:24 frob() b = s32min-5
39 sm_compare.c:25 frob() c = 5
40 * check-output-end