Correctly handle conditional operators involving throw.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90800 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/CodeGenCXX/throw-expressions.cpp b/test/CodeGenCXX/throw-expressions.cpp
new file mode 100644
index 0000000..7fe5563
--- /dev/null
+++ b/test/CodeGenCXX/throw-expressions.cpp
@@ -0,0 +1,10 @@
+// RUN: clang-cc -emit-llvm-only -verify %s
+
+int val = 42;
+int& test1() {
+  return throw val, val;
+}
+
+int test2() {
+  return val ? throw val : val;
+}