aboutsummaryrefslogtreecommitdiff
path: root/test/CodeGenCXX/pr31054.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/CodeGenCXX/pr31054.cpp')
-rw-r--r--test/CodeGenCXX/pr31054.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/test/CodeGenCXX/pr31054.cpp b/test/CodeGenCXX/pr31054.cpp
new file mode 100644
index 000000000000..33b17b9eafc8
--- /dev/null
+++ b/test/CodeGenCXX/pr31054.cpp
@@ -0,0 +1,12 @@
+// RUN: %clang_cc1 -triple x86_64-unknown-unknown -emit-llvm -o - %s | FileCheck %s
+
+struct A { ~A(); };
+void func() {
+ return;
+ static A k;
+}
+
+// Test that we did not crash, by checking whether function was created.
+// CHECK-LABEL: define void @_Z4funcv() #0 {
+// CHECK: ret void
+// CHECK: }