[clang] [clang] Fixed inconsistent diagnostics when initializing a constexpr variable with a compound literal (PR #232825)
Eli Friedman via cfe-commits
cfe-commits at lists.llvm.org
Thu Oct 22 09:53:35 PDT 2026
efriedma-quic wrote:
Let's see where we are after https://github.com/llvm/llvm-project/pull/212559 .
C23 rules say the following:
```
// Valid
constexpr int x = (constexpr int){1};
// Not valid: reads non-constexpr compound literal
constexpr int x = (int){1};
```
https://github.com/llvm/llvm-project/pull/232825
More information about the cfe-commits
mailing list