diff options
| author | Stephan Bergmann <sbergman@redhat.com> | 2018-01-05 07:57:24 +0000 |
|---|---|---|
| committer | Stephan Bergmann <sbergman@redhat.com> | 2018-01-05 07:57:24 +0000 |
| commit | 188fd220a7ca4653d9ef6bfe79e51cd5daa45932 (patch) | |
| tree | 76ef5566265758ab50d259b422138b040e3e9905 /clang/test | |
| parent | 8c85bca5a5db8e84891d1cc849efb0773bddf71c (diff) | |
| download | bcm5719-llvm-188fd220a7ca4653d9ef6bfe79e51cd5daa45932.tar.gz bcm5719-llvm-188fd220a7ca4653d9ef6bfe79e51cd5daa45932.zip | |
o -fsanitize=function warning when calling noexcept function through non-noexcept pointer in C++17
As discussed in the mail thread <https://groups.google.com/a/isocpp.org/forum/
#!topic/std-discussion/T64_dW3WKUk> "Calling noexcept function throug non-
noexcept pointer is undefined behavior?", such a call should not be UB.
However, Clang currently warns about it.
This change removes exception specifications from the function types recorded
for -fsanitize=function, both in the functions themselves and at the call sites.
That means that calling a non-noexcept function through a noexcept pointer will
also not be flagged as UB. In the review of this change, that was deemed
acceptable, at least for now. (See the "TODO" in compiler-rt
test/ubsan/TestCases/TypeCheck/Function/function.cpp.)
This is the compiler-rt part of a patch covering both cfe and compiler-rt.
Differential Revision: https://reviews.llvm.org/D40720
llvm-svn: 321860
Diffstat (limited to 'clang/test')
0 files changed, 0 insertions, 0 deletions

