[c++1z] P0003R5: Removing dynamic exception specifications.
authorRichard Smith <richard-llvm@metafoo.co.uk>
Thu, 8 Dec 2016 02:49:07 +0000 (02:49 +0000)
committerRichard Smith <richard-llvm@metafoo.co.uk>
Thu, 8 Dec 2016 02:49:07 +0000 (02:49 +0000)
commit82da19ddb327df5d6f1a78d3fc012525ed2c7309
treed4fbaeff89f1d58a0d902e280d1967cf8259124b
parentd93779da151a46532353c07b704b8e569ed1c81a
[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
15 files changed:
clang/include/clang/Basic/DiagnosticGroups.td
clang/include/clang/Basic/DiagnosticSemaKinds.td
clang/lib/Parse/ParseDeclCXX.cpp
clang/test/CXX/conv/conv.fctptr/p1.cpp
clang/test/CXX/drs/dr0xx.cpp
clang/test/CXX/drs/dr13xx.cpp
clang/test/CXX/drs/dr1xx.cpp
clang/test/CXX/drs/dr2xx.cpp
clang/test/CXX/drs/dr4xx.cpp
clang/test/CXX/drs/dr5xx.cpp
clang/test/CXX/expr/p13.cpp
clang/test/CodeGenCXX/mangle-exception-spec.cpp
clang/test/SemaCXX/cxx1z-noexcept-function-type.cpp
clang/test/SemaCXX/deprecated.cpp
clang/www/cxx_status.html