summaryrefslogtreecommitdiffstats
path: root/test/CodeGenCXX/destructors.cpp
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2013-11-05 06:44:57 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2013-11-05 06:44:57 +0000
commitf88f10ab6ea77c8091f2197b94cc90a949e105ef (patch)
tree8f68e70af608109e539c8bdc258eba7653095213 /test/CodeGenCXX/destructors.cpp
parent583f6de423aa42c8a4894cc64e72036484e6343b (diff)
Add a testcase from the recent bootstrap failure.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194049 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGenCXX/destructors.cpp')
-rw-r--r--test/CodeGenCXX/destructors.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/test/CodeGenCXX/destructors.cpp b/test/CodeGenCXX/destructors.cpp
index 0030aae92e..f0780bd584 100644
--- a/test/CodeGenCXX/destructors.cpp
+++ b/test/CodeGenCXX/destructors.cpp
@@ -364,6 +364,19 @@ namespace test9 {
// CHECK: call void @_ZN5test92f2Ev()
}
+namespace test10 {
+ // Test that we don't crash.
+ struct Option {
+ virtual ~Option() {}
+ };
+ template <class DataType> class opt : public Option {};
+ template class opt<int>;
+ bool handleOccurrence() {
+ Option x;
+ return true;
+ }
+}
+
// Checks from test3:
// CHECK-LABEL: define internal void @_ZN5test312_GLOBAL__N_11DD0Ev(%"struct.test3::<anonymous namespace>::D"* %this) unnamed_addr