param_cleared: handle direct assignments
[smatch.git] / validation / sm_fake_assignment.c
blob28f7fdb446b8985184df41a705022466cc63dea4
1 #include "check_debug.h"
3 struct ture {
4 int x, y;
5 };
7 struct ture outside = {
8 .x = 1,
9 .y = 2,
12 struct ture buf[10];
13 void test(void)
15 int a, b;
17 a = 0;
18 b = 0;
19 buf[a++] = outside;
20 buf[++b] = outside;
21 __smatch_implied(a);
22 __smatch_implied(b);
26 * check-name: smatch fake assignment
27 * check-command: smatch -I.. sm_fake_assignment.c
29 * check-output-start
30 sm_fake_assignment.c:21 test() implied: a = '1'
31 sm_fake_assignment.c:22 test() implied: b = '1'
32 * check-output-end