db: export get_static_filter()
[smatch.git] / validation / sm_inline3.c
blobfbf900bd9752a8e253a425ffc78e362e19befc48
1 #include "check_debug.h"
2 #include "test.h"
4 void memset(void *p, char pat, int size);
6 struct foo {
7 int a, b;
8 };
10 void my_func(struct foo *p)
12 memset(p, 0, sizeof(*p));
13 p->a = 1;
16 struct foo *my_pointer;
18 void test(void)
20 struct foo foo;
22 my_func(my_pointer);
23 my_func(&foo);
24 __smatch_implied(my_pointer->a);
25 __smatch_implied(my_pointer->b);
26 __smatch_implied(foo.a);
27 __smatch_implied(foo.b);
31 * check-name: smatch: inline #3
32 * check-command: smatch -I.. sm_inline3.c
34 * check-output-start
35 sm_inline3.c:24 test() implied: my_pointer->a = '1'
36 sm_inline3.c:25 test() implied: my_pointer->b = '0'
37 sm_inline3.c:26 test() implied: foo.a = '1'
38 sm_inline3.c:27 test() implied: foo.b = '0'
39 * check-output-end