blob: 7290d2efcb083fe4e27cb11c8e14244b354fd10d [file] [log] [blame]
Douglas Gregor025452f2009-04-17 00:04:06 +00001// Header for PCH test stmts.c
2
3void f0(int x) {
4 // NullStmt
5 ;
6 // IfStmt
7 if (x) {
8 } else if (x + 1) {
9 }
10
11 switch (x) {
12 case 0:
13 x = 17;
14 break;
15
16 case 1:
17 break;
18
19 default:
Douglas Gregor0de9d882009-04-17 16:34:57 +000020 switch (x >> 1) {
21 case 7:
22 // fall through
23 case 9:
24 break;
25 }
26 x += 2;
Douglas Gregor025452f2009-04-17 00:04:06 +000027 break;
28 }
Douglas Gregord921cf92009-04-17 00:16:09 +000029
30 while (x > 20) {
31 if (x > 30) {
32 --x;
33 continue;
Douglas Gregor67d82492009-04-17 00:29:51 +000034 } else if (x < 5)
35 break;
Douglas Gregord921cf92009-04-17 00:16:09 +000036 }
Douglas Gregor67d82492009-04-17 00:29:51 +000037
38 do {
39 x++;
40 } while (x < 10);
41
Douglas Gregor0de9d882009-04-17 16:34:57 +000042 for (; x < 20; ++x) {
43 if (x == 12)
44 return;
45 }
46}
47
48int f1(int x) {
49 switch (x) {
50 case 17:
51 return 12;
52
53 default:
54 break;
55 }
56
57 return x*2;
Douglas Gregor025452f2009-04-17 00:04:06 +000058}