| Issue |
109096
|
| Summary |
clang miscompilation with consteval functions called implicitly in destructor
|
| Labels |
clang
|
| Assignees |
|
| Reporter |
kelbon
|
https://godbolt.org/z/MzaPMraqK
This code incorrectly produces runtime error instead of compilation error in checking fmt::format string
```cpp
#include <fmt/core.h>
template<typename T>
struct scope_exit {
T val;
constexpr ~scope_exit() { val(); }
};
int main() {
scope_exit x([]() { std::string s = fmt::format("{}"); });
}
```
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs