| Anders Carlsson | abea951 | 2011-02-28 00:40:07 +0000 | [diff] [blame] | 1 | // RUN: %clang_cc1 -fcxx-exceptions -fexceptions -emit-llvm-only -verify %s -Wno-unreachable-code |
| Eli Friedman | 48daf59 | 2009-12-07 20:25:53 +0000 | [diff] [blame] | 2 | |
| 3 | int val = 42; | ||||
| 4 | int& test1() { | ||||
| 5 | return throw val, val; | ||||
| 6 | } | ||||
| 7 | |||||
| 8 | int test2() { | ||||
| 9 | return val ? throw val : val; | ||||
| 10 | } | ||||
| John McCall | 14e1bc9 | 2010-10-29 08:14:02 +0000 | [diff] [blame] | 11 | |
| 12 | // rdar://problem/8608801 | ||||
| 13 | void test3() { | ||||
| 14 | throw false; | ||||
| 15 | } | ||||