diff options
author | Nico Weber <nicolasweber@gmx.de> | 2017-08-30 20:25:22 +0000 |
---|---|---|
committer | Nico Weber <nicolasweber@gmx.de> | 2017-08-30 20:25:22 +0000 |
commit | 955bb84090c13ad03017cea9ded2d19a819e90c9 (patch) | |
tree | d0315fa7875b8334a5033722a21c47492377c629 /clang/test/SemaCXX/implicit-exception-spec.cpp | |
parent | 6be49244b1e19fd8675b1fe7581cb4a37ba80bcb (diff) | |
download | bcm5719-llvm-955bb84090c13ad03017cea9ded2d19a819e90c9.tar.gz bcm5719-llvm-955bb84090c13ad03017cea9ded2d19a819e90c9.zip |
Let -Wdelete-non-virtual-dtor fire in system headers too.
Makes the warning useful again in a std::unique_ptr world, PR28460.
Also make the warning not fire in unevaluated contexts, since system libraries
(e.g. libc++) do do that. This would've been a good change before we started
emitting this warning in system headers too, but "normal" code seems to be less
template-heavy, so we didn't notice until now.
https://reviews.llvm.org/D37235
llvm-svn: 312167
Diffstat (limited to 'clang/test/SemaCXX/implicit-exception-spec.cpp')
-rw-r--r-- | clang/test/SemaCXX/implicit-exception-spec.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/test/SemaCXX/implicit-exception-spec.cpp b/clang/test/SemaCXX/implicit-exception-spec.cpp index f400c222de8..c21f773e94c 100644 --- a/clang/test/SemaCXX/implicit-exception-spec.cpp +++ b/clang/test/SemaCXX/implicit-exception-spec.cpp @@ -121,7 +121,7 @@ namespace PotentiallyConstructed { T &a = *p; static_assert(noexcept(a = a) == D, ""); static_assert(noexcept(a = static_cast<T&&>(a)) == E, ""); - static_assert(noexcept(delete &a) == F, ""); // expected-warning 2{{abstract}} + static_assert(noexcept(delete &a) == F, ""); // These are last because the first failure here causes instantiation to bail out. static_assert(noexcept(new (nothrow) T()) == A, ""); // expected-error 2{{abstract}} |