1 #include "check_debug.h"
2 
3 struct foo {
4 	char buf[42];
5 	int x[4];
6 };
7 
function(void)8 int function(void)
9 {
10 	struct foo foo;
11 
12 	__smatch_buf_size(&foo);
13 	__smatch_buf_size(&(foo.buf[0]));
14 	__smatch_buf_size(&foo.x[0]);
15 	__smatch_buf_size(&foo.x[1]);
16 
17 	return 0;
18 }
19 /*
20  * check-name: smatch buf size #5
21  * check-command: smatch --spammy -I.. sm_buf_size5.c
22  *
23  * check-output-start
24 sm_buf_size5.c:12 function() buf size: '&foo' 1 elements, 60 bytes
25 sm_buf_size5.c:13 function() buf size: '&(foo.buf[0])' 42 elements, 42 bytes
26 sm_buf_size5.c:14 function() buf size: '&foo.x[0]' 4 elements, 16 bytes
27 sm_buf_size5.c:15 function() buf size: '&foo.x[1]' 3 elements, 12 bytes
28  * check-output-end
29  */
30