xref: /freebsd/usr.bin/indent/tests/elsecomment.0 (revision 1d386b48)
1/* See r303484 and r309342 */
2void t(void) {
3	/* The two if statements below excercise two different code paths. */
4
5	if (1) /* a */ int a; else /* b */ int b;
6
7	if (1) /* a */
8		int a;
9	else /* b */
10		int b;
11
12	if (1) {
13
14	}
15
16
17
18	/* Old indent would remove the 3 blank lines above, awaiting "else". */
19
20	if (1) {
21		int a;
22	}
23
24
25	else if (0) {
26		int b;
27	}
28	/* test */
29	else
30		;
31
32	if (1)
33		;
34	else /* Old indent would get very confused here */
35	/* We also mustn't assume that there's only one comment */
36	/* before the left brace. */
37	{
38
39
40	}
41}
42