aboutsummaryrefslogtreecommitdiff
path: root/test/C++Frontend/2007-05-23-TryFinally.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/C++Frontend/2007-05-23-TryFinally.cpp')
-rw-r--r--test/C++Frontend/2007-05-23-TryFinally.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/test/C++Frontend/2007-05-23-TryFinally.cpp b/test/C++Frontend/2007-05-23-TryFinally.cpp
new file mode 100644
index 0000000000..5ae40d79b4
--- /dev/null
+++ b/test/C++Frontend/2007-05-23-TryFinally.cpp
@@ -0,0 +1,15 @@
+// RUN: %llvmgxx %s -S -emit-llvm -O2 -o - | grep _Unwind_Resume | wc -l | grep {\[03\]}
+
+struct One { };
+struct Two { };
+
+void handle_unexpected () {
+ try
+ {
+ throw;
+ }
+ catch (One &)
+ {
+ throw Two ();
+ }
+}