diff options
Diffstat (limited to 'clang/test/CodeGen/switch.c')
| -rw-r--r-- | clang/test/CodeGen/switch.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/clang/test/CodeGen/switch.c b/clang/test/CodeGen/switch.c index 690c11e9f36..25602e93c37 100644 --- a/clang/test/CodeGen/switch.c +++ b/clang/test/CodeGen/switch.c @@ -15,3 +15,18 @@ int foo(int i) { } +int foo2(int i) { + int j = 0; + switch (i) { + case 1 : + j = 2; break; + case 2 ... 10: + j = 3; break; + default: + j = 42; break; + } + j = j + 1; + return j; +} + + |

