aboutsummaryrefslogtreecommitdiff
path: root/test/CodeGenCXX/destructor-exception-spec.cpp
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2012-07-30 23:48:14 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2012-07-30 23:48:14 +0000
commitdd25e80a6d67485173fe295f54418e05764cc8cb (patch)
treeccd40b5d355bc82daca11131956ca70c8f01bae2 /test/CodeGenCXX/destructor-exception-spec.cpp
parent57c033621dacd8720ac9ff65a09025f14f70e22f (diff)
PR13479: If we see the definition of an out-of-line destructor in C++11, be
sure to update the exception specification on the declaration as well as the definition. If we're building in -fno-exceptions mode, nothing else will trigger it to be updated. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161008 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGenCXX/destructor-exception-spec.cpp')
-rw-r--r--test/CodeGenCXX/destructor-exception-spec.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/test/CodeGenCXX/destructor-exception-spec.cpp b/test/CodeGenCXX/destructor-exception-spec.cpp
new file mode 100644
index 0000000000..579daef854
--- /dev/null
+++ b/test/CodeGenCXX/destructor-exception-spec.cpp
@@ -0,0 +1,12 @@
+// RUN: %clang_cc1 -emit-llvm-only %s -std=c++11
+
+// PR13479: don't crash with -fno-exceptions.
+namespace {
+ struct SchedulePostRATDList {
+ virtual ~SchedulePostRATDList();
+ };
+
+ SchedulePostRATDList::~SchedulePostRATDList() {}
+
+ SchedulePostRATDList Scheduler;
+}