implied: use a time based timeout instead of counting ->nr_children
[smatch.git] / validation / sm_initializer.c
blob238d575f0d5051ea360b552706d83e2c09e98cd6
1 #include "check_debug.h"
3 struct bar {
4 int a, b, c;
5 };
7 struct foo {
8 struct bar bar;
9 int x, y, z;
12 int test(int size)
14 struct foo foo = {
15 .bar.a = 42,
16 .bar.b = 43,
17 -1,
19 __smatch_implied(foo.bar.b);
20 __smatch_implied(foo.bar.c);
21 __smatch_implied(foo.x);
22 __smatch_implied(foo.y);
24 return 0;
28 * check-name: smatch: nested initializer
29 * check-command: smatch -I.. sm_initializer.c
31 * check-output-start
32 sm_initializer.c:19 test() implied: foo.bar.b = '43'
33 sm_initializer.c:20 test() implied: foo.bar.c = '0'
34 sm_initializer.c:21 test() implied: foo.x = '(-1)'
35 sm_initializer.c:22 test() implied: foo.y = '0'
36 * check-output-end