]> granicus.if.org Git - clang/commitdiff
Add a test for r261425.
authorDavid Majnemer <david.majnemer@gmail.com>
Mon, 22 Feb 2016 17:22:01 +0000 (17:22 +0000)
committerDavid Majnemer <david.majnemer@gmail.com>
Mon, 22 Feb 2016 17:22:01 +0000 (17:22 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@261534 91177308-0d34-0410-b5e6-96231b3b80d8

test/CodeGenCXX/exceptions-cxx-ehsc.cpp [new file with mode: 0644]

diff --git a/test/CodeGenCXX/exceptions-cxx-ehsc.cpp b/test/CodeGenCXX/exceptions-cxx-ehsc.cpp
new file mode 100644 (file)
index 0000000..423c1b7
--- /dev/null
@@ -0,0 +1,16 @@
+// RUN: %clang_cc1 -emit-llvm %s -o - -triple=i386-pc-win32 -fexceptions -fcxx-exceptions -fexternc-nounwind | FileCheck %s
+
+namespace test1 {
+struct Cleanup { ~Cleanup(); };
+extern "C" void never_throws();
+void may_throw();
+
+void caller() {
+  Cleanup x;
+  never_throws();
+  may_throw();
+}
+}
+// CHECK-LABEL: define void @"\01?caller@test1@@YAXXZ"(
+// CHECK: call void @never_throws(
+// CHECK: invoke void @"\01?may_throw@test1@@YAXXZ"(