2 #include "check_debug.h"
33 p
= malloc(sizeof(*p
) + 100);
34 __smatch_buf_size(p
->msg
);
36 q
= malloc(sizeof(*q
) + 100);
37 __smatch_buf_size(q
->msg
);
39 a
= malloc(sizeof(*a
) + 100);
40 __smatch_buf_size(a
->foo
);
42 b
= malloc(sizeof(*b
) + 100);
43 __smatch_buf_size(b
->bar
);
47 * check-name: smatch buf size #8
48 * check-command: smatch -I.. sm_buf_size8.c
51 sm_buf_size8.c:34 test() buf size: 'p->msg' 100 elements, 100 bytes
52 sm_buf_size8.c:37 test() buf size: 'q->msg' 101 elements, 101 bytes
53 sm_buf_size8.c:40 test() buf size: 'a->foo' 0 elements, 116 bytes
54 sm_buf_size8.c:43 test() buf size: 'b->bar' 0 elements, 120 bytes