Speed up compilation by avoiding generating exceptional edges from
CallExprs as those edges help cause a n^2 explosion in the number of
destructor calls.  Other consumers, such as static analysis, that
would like to have more a more complete CFG can select the inclusion
of those edges as CFG build time.

This also fixes up the two compilation users of CFGs to be tolerant of
having or not having those edges.  All catch code is assumed be to
live if we didn't generate the exceptional edges for CallExprs.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94074 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/SemaCXX/warn-unreachable.cpp b/test/SemaCXX/warn-unreachable.cpp
new file mode 100644
index 0000000..13a82f4
--- /dev/null
+++ b/test/SemaCXX/warn-unreachable.cpp
@@ -0,0 +1,35 @@
+// RUN: %clang %s -fsyntax-only -Xclang -verify -fblocks -Wunreachable-code -Wno-unused-value
+
+int live();
+int dead();
+int liveti() throw(int);
+int (*livetip)() throw(int);
+
+int test1() {
+  try {
+    live();
+  } catch (int i) {
+    live();
+  }
+  return 1;
+}
+
+void test2() {
+  try {
+    live();
+  } catch (int i) {
+    live();
+  }
+  try {
+    liveti();
+  } catch (int i) {
+    live();
+  }
+  try {
+    livetip();
+  } catch (int i) {
+    live();
+  }
+  throw 1;
+  dead();       // expected-warning {{will never be executed}}
+}