================ @@ -254,6 +254,224 @@ void foo() { } } // namespace CXX17_aggregate_construction +namespace newexpr_init_list_initialization { ---------------- Flandini wrote:
They currently take different code paths and have different results in CSA. I think ideally they would use the same code. The issue this PR is for doesn't properly initialize in this case: ``` struct S { int foo; int bar; }; void f() { S *s = new S{ .foo = 13, .bar = 1, }; int retval = s->bar; delete s; } ``` But if you change remove this new expression and list initialize some `S` with automatic storage duration, this works as expected. I plan to change the two to use the same binding code, but I think there would still be some differences in the code in expr engine. https://github.com/llvm/llvm-project/pull/127702 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits