================
@@ -470,3 +470,20 @@ struct S2 {
const struct S2 s2[2] = {{{"foo"}, 1}, [0].L[2] = 'x'}; // expected-warning
{{initializer partially overrides prior initialization of this subobject}} \
// expected-note
{{previous initialization is here}}
static_assert(s2[0].L[2] == 'x');// expected-warning {{folding it to a
constant is a GNU extension}}
+
+// gh121694
+const int a = 0;
+struct C { const int *p; };
+constexpr struct C c1 = {&a}; // expected-error{{constexpr pointer initializer
is not null}}
----------------
aalmkainzi wrote:
I've undo-ed the value dependent commit and made a separate issue for it
https://github.com/llvm/llvm-project/issues/229888
https://github.com/llvm/llvm-project/pull/228776
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits