Correct handling of the 'throw()' exception specifier in C++17.
authorJames Y Knight <jyknight@google.com>
Tue, 9 Nov 2021 01:06:15 +0000 (20:06 -0500)
committerJames Y Knight <jyknight@google.com>
Wed, 10 Nov 2021 22:40:16 +0000 (17:40 -0500)
commitfddc4e41164e2fd152605362639eb3255cc75212
tree96117643f209a46161651c9fb78dfd01904e069c
parent860d3811a9b2f3df0ac093d87832056fd7a19b87
Correct handling of the 'throw()' exception specifier in C++17.

Per C++17 [except.spec], 'throw()' has become equivalent to
'noexcept', and should therefore call std::terminate, not
std::unexpected.

Differential Revision: https://reviews.llvm.org/D113517
clang/lib/CodeGen/CGException.cpp
clang/test/CXX/except/except.spec/p9-dynamic.cpp