diff options
author | Richard Smith <richard-llvm@metafoo.co.uk> | 2012-07-30 23:48:14 +0000 |
---|---|---|
committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2012-07-30 23:48:14 +0000 |
commit | dd25e80a6d67485173fe295f54418e05764cc8cb (patch) | |
tree | ccd40b5d355bc82daca11131956ca70c8f01bae2 /test/CodeGenCXX/destructor-exception-spec.cpp | |
parent | 57c033621dacd8720ac9ff65a09025f14f70e22f (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.cpp | 12 |
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; +} |