summaryrefslogtreecommitdiffstats
path: root/clang/test/CodeGenCXX/mangle-exception-spec.cpp
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2016-12-08 02:49:07 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2016-12-08 02:49:07 +0000
commit82da19ddb327df5d6f1a78d3fc012525ed2c7309 (patch)
treed4fbaeff89f1d58a0d902e280d1967cf8259124b /clang/test/CodeGenCXX/mangle-exception-spec.cpp
parentd93779da151a46532353c07b704b8e569ed1c81a (diff)
downloadbcm5719-llvm-82da19ddb327df5d6f1a78d3fc012525ed2c7309.tar.gz
bcm5719-llvm-82da19ddb327df5d6f1a78d3fc012525ed2c7309.zip
[c++1z] P0003R5: Removing dynamic exception specifications.
We continue to support dynamic exception specifications in C++1z as an extension, but produce an error-by-default warning when we encounter one. This allows users to opt back into the feature with a warning flag, and implicitly opts system headers back into the feature should they happen to use it. There is one semantic change implied by P0003R5 but not implemented here: violating a throw() exception specification should now call std::terminate directly instead of calling std::unexpected(), but since P0003R5 also removes std::unexpected() and std::set_unexpected, and the default unexpected handler calls std::terminate(), a conforming C++1z program cannot tell that we are still calling it. The upside of this strategy is perfect backwards compatibility; the downside is that we don't get the more efficient 'noexcept' codegen for 'throw()'. llvm-svn: 289019
Diffstat (limited to 'clang/test/CodeGenCXX/mangle-exception-spec.cpp')
-rw-r--r--clang/test/CodeGenCXX/mangle-exception-spec.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/test/CodeGenCXX/mangle-exception-spec.cpp b/clang/test/CodeGenCXX/mangle-exception-spec.cpp
index 7991f003514..15f7a8b6cb5 100644
--- a/clang/test/CodeGenCXX/mangle-exception-spec.cpp
+++ b/clang/test/CodeGenCXX/mangle-exception-spec.cpp
@@ -1,5 +1,5 @@
-// RUN: %clang_cc1 -std=c++11 -emit-llvm %s -o - -triple=x86_64-apple-darwin9 | FileCheck %s --check-prefix CHECK --check-prefix CHECK-CXX11
-// RUN: %clang_cc1 -std=c++1z -emit-llvm %s -o - -triple=x86_64-apple-darwin9 | FileCheck %s --check-prefix CHECK --check-prefix CHECK-CXX17
+// RUN: %clang_cc1 -std=c++11 -emit-llvm %s -o - -triple=x86_64-apple-darwin9 -Wno-dynamic-exception-spec | FileCheck %s --check-prefix CHECK --check-prefix CHECK-CXX11
+// RUN: %clang_cc1 -std=c++1z -emit-llvm %s -o - -triple=x86_64-apple-darwin9 -Wno-dynamic-exception-spec | FileCheck %s --check-prefix CHECK --check-prefix CHECK-CXX17
// CHECK: define {{.*}} @_Z1aPFivE(
void a(int() throw(int, float)) {}
OpenPOWER on IntegriCloud