summaryrefslogtreecommitdiff
path: root/test/CodeGenCXX/throw-expression-cleanup.cpp
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2012-08-15 20:02:54 +0000
committerDimitry Andric <dim@FreeBSD.org>2012-08-15 20:02:54 +0000
commit56d91b49b13fe55c918afbda19f6165b5fbff87a (patch)
tree9abb1a658a297776086f4e0dfa6ca533de02104e /test/CodeGenCXX/throw-expression-cleanup.cpp
parent41e20f564abdb05101d6b2b29c59459a966c22cc (diff)
Notes
Diffstat (limited to 'test/CodeGenCXX/throw-expression-cleanup.cpp')
-rw-r--r--test/CodeGenCXX/throw-expression-cleanup.cpp22
1 files changed, 22 insertions, 0 deletions
diff --git a/test/CodeGenCXX/throw-expression-cleanup.cpp b/test/CodeGenCXX/throw-expression-cleanup.cpp
new file mode 100644
index 000000000000..0c41bc65bc3c
--- /dev/null
+++ b/test/CodeGenCXX/throw-expression-cleanup.cpp
@@ -0,0 +1,22 @@
+// RUN: %clang_cc1 %s -emit-llvm -fcxx-exceptions -fexceptions -std=c++11 -o - | FileCheck %s
+// PR13359
+
+struct X {
+ ~X();
+};
+struct Error {
+ Error(const X&) noexcept;
+};
+
+void f() {
+ try {
+ throw Error(X());
+ } catch (...) { }
+}
+
+// CHECK: define void @_Z1fv
+// CHECK: call void @_ZN5ErrorC1ERK1X
+// CHECK: invoke void @__cxa_throw
+// CHECK: landingpad
+// CHECK: call void @_ZN1XD1Ev
+// CHECK-NOT: __cxa_free_exception