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 | 7f78227ce95722f70de3c3b8b33dc0d83375db46 (patch) | |
tree | 013be5a78923ef0b482170489b1b59c7df7c994e /clang/test/CodeGenCXX/destructor-exception-spec.cpp | |
parent | 535a23c38b63adf1bb4a3c5be05db2832a73ba55 (diff) | |
download | bcm5719-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.cpp | 12 |
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; +} |