implied: use a time based timeout instead of counting ->nr_children
[smatch.git] / validation / sm_inline3.c
blobe4fb268ef40d4d4c87c8cde109b953dadf57b77e
1 #include "check_debug.h"
3 void memset(void *p, char pat, int size);
5 struct foo {
6 int a, b;
7 };
9 void my_func(struct foo *p)
11 memset(p, 0, sizeof(*p));
12 p->a = 1;
15 struct foo *my_pointer;
17 void test(void)
19 struct foo foo;
21 my_func(my_pointer);
22 my_func(&foo);
23 __smatch_implied(my_pointer->a);
24 __smatch_implied(my_pointer->b);
25 __smatch_implied(foo.a);
26 __smatch_implied(foo.b);
30 * check-name: smatch: inline #3
31 * check-command: smatch -I.. sm_inline3.c
33 * check-output-start
34 sm_inline3.c:23 test() implied: my_pointer->a = '1'
35 sm_inline3.c:24 test() implied: my_pointer->b = '0'
36 sm_inline3.c:25 test() implied: foo.a = '1'
37 sm_inline3.c:26 test() implied: foo.b = '0'
38 * check-output-end