summaryrefslogtreecommitdiffstats
path: root/debian/uncrustify-trinity/uncrustify-trinity-0.73.0/tests/expected/c/00205-case-nl_before_return.c
blob: b650d7ab4ef348fdb6976eee2b0ef4096b49b5f4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
int foo(int arg)
{
	switch (arg)
	{
	case 0: return 1;
	case 1:
		return 2;
	case 2:
		printf("Hello world!\n");
		return 3;
	case 3:
	{
		int a = 4;
		return a;
	}
	case 4:

		return 5;
	case 5:
		printf("Hello world!\n");

		return 6;
	case 6:
	{
		int a = 7;

		return a;
	}
	case 7: /* comment */ return 8;
	case 8:
		/* C-style comment */
		return 9;
	case 9: /* trailing comment */
		return 10;
	case 10: /* trailing comment */
		/* C-style comment */
		return 11;
	case 11:
		// C++-style comment
		return 12;
	case 12:
		// Multi-line
		// C++-style comment
		return 13;
	case 13: // trailing comment
		// Multi-line
		// C++-style comment
		return 14;
	case 14:

		// Multi-line
		// C++-style comment
		return 15;
	case 15:

		/* C-style comment */
		return 16;
	case 16:
		/*
		 * Multi-line C-style comment
		 */
		return 17;
	case 17:
		/*--------------------*/
		/* Multi-part comment */
		/*--------------------*/
		return 18;
	case 18:
		/*---------------------*/
		// Mixed-style comment
		/*---------------------*/
		return 19;
	default:
		return arg++;
	}
	return 0;
}