summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDuncan Sands <baldrick@free.fr>2007-07-04 20:48:48 +0000
committerDuncan Sands <baldrick@free.fr>2007-07-04 20:48:48 +0000
commitfda68e7b10a5ed3251e8b9f48685724c38a79a69 (patch)
treeaf748620d35086d99742ed2df8d5be6799d3917a
parent98c09a07ca18ddbb86325bae784f8c0e66a0f065 (diff)
downloadbcm5719-llvm-fda68e7b10a5ed3251e8b9f48685724c38a79a69.tar.gz
bcm5719-llvm-fda68e7b10a5ed3251e8b9f48685724c38a79a69.zip
Nested try-catch-filter testcase.
llvm-svn: 37874
-rw-r--r--llvm/test/C++Frontend/2007-07-04-NestedCatches.cpp32
1 files changed, 32 insertions, 0 deletions
diff --git a/llvm/test/C++Frontend/2007-07-04-NestedCatches.cpp b/llvm/test/C++Frontend/2007-07-04-NestedCatches.cpp
new file mode 100644
index 00000000000..035d5bbcf33
--- /dev/null
+++ b/llvm/test/C++Frontend/2007-07-04-NestedCatches.cpp
@@ -0,0 +1,32 @@
+// RUN: %llvmgxx %s -S -emit-llvm -O2 -o - | \
+// RUN: ignore grep {eh\.selector.*One.*Two.*Three.*Four.*Five.*Six.*null} | \
+// RUN: wc -l | grep {\[02\]}
+
+extern void X(void);
+
+struct One {};
+struct Two {};
+struct Three {};
+struct Four {};
+struct Five {};
+struct Six {};
+
+static void A(void) throw ()
+{
+ X();
+}
+
+static void B(void) throw (Two)
+{
+ try { A(); } catch (One) {}
+}
+
+static void C(void) throw (Six, Five)
+{
+ try { B(); } catch (Three) {} catch (Four) {}
+}
+
+int main ()
+{
+ try { C(); } catch (...) {}
+}
OpenPOWER on IntegriCloud