[clang] [clang] reject initializing constexpr objects with compound literals that contain non-null pointers (PR #230477)
Abdulmalek Almkainzi via cfe-commits
cfe-commits at lists.llvm.org
Fri Oct 9 05:31:23 PDT 2026
aalmkainzi wrote:
Another thing. the tests:
```C
const nullptr_t woo;
constexpr struct C c3 = { woo }; // expected-error{{constexpr pointer initializer is not null}}
void func() {
const nullptr_t woo;
constexpr struct C c1 = { woo }; // expected-error{{constexpr pointer initializer is not null}}
}
```
are not included.
I think making them work requires another PR.
https://github.com/llvm/llvm-project/pull/230477
More information about the cfe-commits
mailing list