================ @@ -4861,8 +4861,9 @@ static void TryListInitialization(Sema &S, S.Context.hasSameUnqualifiedType(SubInit[0]->getType(), DestType) && "Deduced to other type?"); TryArrayCopy(S, - InitializationKind::CreateCopy(Kind.getLocation(), - InitList->getLBraceLoc()), + InitializationKind::CreateDirect(Kind.getLocation(), + InitList->getLBraceLoc(), + InitList->getRBraceLoc()), ---------------- cor3ntin wrote:
> and each element is copy-initialized or direct-initialized from the > corresponding element of the > [assignment-expression](https://eel.is/c++draft/expr.ass#nt:assignment-expression) > as specified by the form of the > [initializer](https://eel.is/c++draft/dcl.init.general#nt:initializer)[.](https://eel.is/c++draft/dcl.struct.bind#1.sentence-8) > Otherwise, e is defined as-if by So I think ```cpp auto [_]{a}; // direct-initialization auto [_](a); // copy-initializer ``` Is my understanding correct that we need that we need to look at `Kind.getKind()` and call either `CreateCopy` or CreateDirect? https://github.com/llvm/llvm-project/pull/124793 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits