generisize.pl: strip all strings not just the first
[smatch.git] / validation / sm_select_assign.c
blob42f7176b863cf15d69d7d2d4aa99eb1eb9d21464
1 #include "check_debug.h"
3 void frob();
5 #define min(a, b) ((a) < (b) ? (a) : (b))
7 void func(void)
9 int i;
10 int val;
12 for (i = 0; i < 10; i++) {
13 val = min(5, i);
14 __smatch_value("val");
17 i++;
18 __smatch_value("i");
19 val = min(100, i);
20 __smatch_value("val");
22 for (i = 0; i < 10; i++)
23 frob();
25 val = min(100, i);
26 __smatch_value("val");
29 * check-name: assigning select statements
30 * check-command: smatch -I.. sm_select_assign.c
32 * check-output-start
33 sm_select_assign.c:14 func() val = 0-5
34 sm_select_assign.c:18 func() i = 11-max
35 sm_select_assign.c:20 func() val = 11-100
36 sm_select_assign.c:26 func() val = 10
37 * check-output-end