Issue |
90021
|
Summary |
[Clang] A trivial but `noexcept(false)` destructor is incorrectly considered non-throwing
|
Labels |
clang
|
Assignees |
|
Reporter |
frederick-vs-ja
|
Currently, Clang incorrectly accepts the following code snippet, which conflicts with [[except.spec]/6.2](https://eel.is/c++draft/except.spec#6.2).
```C++
struct TrivialButPotentiallyThrowingDestructor {
TrivialButPotentiallyThrowingDestructor() = default;
~TrivialButPotentiallyThrowingDestructor() noexcept(false) = default;
};
static_assert(noexcept(TrivialButPotentiallyThrowingDestructor{}), "???");
```
It's curious that other compilers also get this wrong ([Godbolt link](https://godbolt.org/z/b3oxaosjP)). #70545 may be related.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs