summaryrefslogtreecommitdiffstats
path: root/clang/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
commit7f78227ce95722f70de3c3b8b33dc0d83375db46 (patch)
tree013be5a78923ef0b482170489b1b59c7df7c994e /clang/test/CodeGenCXX/destructor-exception-spec.cpp
parent535a23c38b63adf1bb4a3c5be05db2832a73ba55 (diff)
downloadbcm5719-llvm-7f78227ce95722f70de3c3b8b33dc0d83375db46.tar.gz
bcm5719-llvm-7f78227ce95722f70de3c3b8b33dc0d83375db46.zip
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. llvm-svn: 161008
Diffstat (limited to 'clang/test/CodeGenCXX/destructor-exception-spec.cpp')
-rw-r--r--clang/test/CodeGenCXX/destructor-exception-spec.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/clang/test/CodeGenCXX/destructor-exception-spec.cpp b/clang/test/CodeGenCXX/destructor-exception-spec.cpp
new file mode 100644
index 00000000000..579daef8541
--- /dev/null
+++ b/clang/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;
+}
OpenPOWER on IntegriCloud