[PATCH] D40720: No -fsanitize=function warning when calling noexcept function through non-noexcept pointer in C++17

Stephan Bergmann via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Dec 19 05:28:52 PST 2017


sberg added a comment.

In https://reviews.llvm.org/D40720#958743, @vsk wrote:

> > Would it be possible to fix this by stripping the noexcept specifiers from both the function type used in the check and the one that is embedded in the prefix data? The downside is that we won't catch the case where the caller has a noexcept specifier and the callee doesn't, but that seems like an edge case to me, and we can think about fixing it in other ways later.
>
> This sounds fine to me, and it avoids breaking the trapping mode.


...and would be in line with what has been discussed in the mail sub-thread starting at http://lists.llvm.org/pipermail/cfe-commits/Week-of-Mon-20171218/213093.html "Re: r320982 - Revert r320978 'No -fsanitize=function warning when calling noexcept function through non-noexcept pointer in C++17'"


Repository:
  rC Clang

https://reviews.llvm.org/D40720





More information about the cfe-commits mailing list