| Reid Spencer | 5f016e2 | 2007-07-11 17:01:13 +0000 | [diff] [blame] | 1 | // RUN: clang -fsyntax-only %s |
| 2 | |||||
| 3 | int test1() { | ||||
| 4 | { ; { ;;}} ;; | ||||
| 5 | } | ||||
| 6 | |||||
| 7 | int test2() { | ||||
| 8 | if (0) { if (1) {} } else { } | ||||
| 9 | |||||
| 10 | do { } while (0); | ||||
| 11 | |||||
| 12 | while (0) while(0) do ; while(0); | ||||
| 13 | |||||
| 14 | for (0;0;0) | ||||
| 15 | for (;;) | ||||
| 16 | for (9;0;2) | ||||
| 17 | ; | ||||
| 18 | for (int X = 0; 0; 0); | ||||
| 19 | } | ||||
| 20 | |||||
| 21 | int test3() { | ||||
| 22 | switch (0) { | ||||
| 23 | |||||
| 24 | case 4: | ||||
| 25 | if (0) { | ||||
| 26 | case 6: ; | ||||
| 27 | } | ||||
| 28 | default: | ||||
| 29 | ; | ||||
| 30 | } | ||||
| 31 | } | ||||
| 32 | |||||
| 33 | int test4() { | ||||
| 34 | if (0); | ||||
| 35 | |||||
| 36 | int X; // declaration in a block. | ||||
| 37 | |||||
| 38 | foo: if (0); | ||||
| 39 | } | ||||
| 40 | |||||
| 41 | typedef int t; | ||||
| 42 | void test5() { | ||||
| 43 | if (0); | ||||
| 44 | |||||
| 45 | //t x = 0; // FIXME: Enable when handling of typedef names is impl. | ||||
| 46 | |||||
| 47 | if (0); | ||||
| 48 | } | ||||
| 49 | |||||