[llvm-commits] [llvm] r37874 - /llvm/trunk/test/C++Frontend/2007-07-04-NestedCatches.cpp

Duncan Sands baldrick at free.fr
Wed Jul 4 13:48:48 PDT 2007


Author: baldrick
Date: Wed Jul  4 15:48:48 2007
New Revision: 37874

URL: http://llvm.org/viewvc/llvm-project?rev=37874&view=rev
Log:
Nested try-catch-filter testcase.

Added:
    llvm/trunk/test/C++Frontend/2007-07-04-NestedCatches.cpp

Added: llvm/trunk/test/C++Frontend/2007-07-04-NestedCatches.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/C%2B%2BFrontend/2007-07-04-NestedCatches.cpp?rev=37874&view=auto

==============================================================================
--- llvm/trunk/test/C++Frontend/2007-07-04-NestedCatches.cpp (added)
+++ llvm/trunk/test/C++Frontend/2007-07-04-NestedCatches.cpp Wed Jul  4 15:48:48 2007
@@ -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 (...) {}
+}





More information about the llvm-commits mailing list