<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/64061>64061</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
ast-print generates wrong output for braced-init-list constructor initializations
</td>
</tr>
<tr>
<th>Labels</th>
<td>
new issue
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
strimo378
</td>
</tr>
</table>
<pre>
Hi all,
the AST printer (-Xclang -ast-print) generates wrong output for braced-init-list constructor initializations. E.g. `field{}` is always out `field({})`.
The following code (see https://godbolt.org/z/6cvG8bGje)
```
struct a {
};
struct c {
int b;
a a1,a2;
c() : b{}, a1({}), a2{} {
}
};
```
is generates as
```
struct a {
};
struct c {
int b;
a a1;
a a2;
c() : b({}), a1({}), a2({}) {
}
};
```
Especially, the output of `b({})` is incorrect C++ code.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJysk09v4ywQxj_N-DKKRcaJbQ4-5E_T9_72sFfA2KEiJgLcqP30K5xs62R7WK1WiogYHob5yc8jQjD9oHUD6y2s95kY49H5JkRvTq6o6ky69r35z6CwFmgHbA9sc13jUePm_xc8ezNE7RGoXvxQVgw9LkSIi6kOxLHXg_Yi6oAX74Ye3RjPY8TOeZReKN0uzGDiwpoQUbkhRD-q6DymqhHWfIho3BByfMr7HKFkndG2hWoL1R5KhiagsBfxHlLnr3OqbxLiULIc57O_HDV2zlp3MUOPyrU6jR-0xmOM5wDFBugAdOhdK52NufM90OED6FCqt-daPr_q1HbW8baW7PabtlcUFJgmuQqqPRTb-ZWbRn1pEBHNEFF-KlNFoFgC7QTdVVXCJI5QbFD-4t1N0hl-qtB1my7dP5U0v892D3JdTZh9SxH-Gvw75EfgCfduOwe_x35E_Q5-Vpk_--fwT-GslRHWvqeOyfw3H7sueU4--C250gzKea9VxB3QFmg7OS3P2qZoecFFpptlydmSU1VRdmx021b1smiF4oXsVh1r12XFOyGralXykmemIUYFq2jF-JoXlJedpq5ivKsryamuYcX0SRibW_t2Sq7NTAijbsoVK5eZFVLbMEWdaNAXnA6BKCXfN-nOQo59gBVLYQxfXaKJVjefqf5Xkc5Gb5uHxJl4HGWu3AnokN6__S3O3r1qFYEO09QhZTFR_QwAAP__PehWxw">