Yanzuo Liu 6f241e3683
[Clang][Sema] Fix wrong initialization kind when handling initializing structured bindings from an array with direct-list-initialization (#124793)
In 377257f063c, elements of structured bindings are copy-initialized.
They should be direct-initialized because the form of the initializer of
the whole structured bindings is a direct-list-initialization.

> [dcl.struct.bind]/1:
> ... and each element is copy-initialized or direct-initialized from
the corresponding element of the assignment-expression as specified by
the form of the initializer. ...

For example,

```cpp
  int arr[2]{};
  // elements of `[a, b]` should be direct-initialized
  auto [a, b]{arr};
```
2025-02-08 14:31:47 +08:00
..

See llvm/docs/README.txt