Issue |
149041
|
Summary |
[Clang] -Winvalid-constexpr misbehaves in C++23 mode
|
Labels |
clang:frontend,
regression,
rejects-valid,
constexpr
|
Assignees |
|
Reporter |
frederick-vs-ja
|
In C++23/26 mode, Clang rejects the following function definition with `-Winvalid-constexpr` used, saying "constexpr function never produces a constant _expression_". [Godbolt link](https://godbolt.org/z/WaKPMjorP).
```C++
constexpr bool fun(const bool& b) { return b; }
```
This seems related to [P2280R4](https://wg21.link/p2280r4), but the incorrect diagnostic occurs only since Clang 21.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs