[PATCH] D38209: [Sema] Correct nothrow inherited by noexcept
Stephan T. Lavavej via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Sep 25 13:34:06 PDT 2017
STL_MSFT added a comment.
> do you think `__declspec(nothrow)` calling the terminate handler in Clang is a bug?
It's certainly a behavior difference with potential performance impact, although I don't think it can be viewed as a bug, strictly speaking. MSVC treats `__declspec(nothrow)` as an optimization request, with undefined behavior if it's violated. Termination is definitely one of the possible results of undefined behavior.
We've recently had to slightly rethink our EH strategy in light of C++17's addition of noexcept into the type system, and the removal of dynamic exception specifications (and the change in semantics to throw()). MSVC's /EHsc makes this extra fun. If you're interested, I can put you in contact with the compiler dev who recently made those changes.
More information about the cfe-commits