xref: /illumos-gate/usr/src/tools/smatch/src/validation/c99-for-loop.c (revision 915894ef19890baaed00080f85f6b69e225cda98)
1 int c99(void);
2 int c99(void)
3 {
4 	int r = -1;
5 
6 	for (int i = 0; i < 10; i++) {
7 		r = i;
8 	}
9 
10 	return r;
11 }
12 
13 /*
14  * check-name: C99 for loop variable declaration
15  * check-command: test-linearize $file
16  *
17  * check-output-ignore
18  * check-output-contains: phisrc\\.
19  * check-output-contains: phi\\.
20  * check-output-contains: add\\.
21  */
22