<table border="1" cellspacing="0" cellpadding="8">
    <tr>
        <th>Issue</th>
        <td>
            <a href=https://github.com/llvm/llvm-project/issues/90955>90955</a>
        </td>
    </tr>

    <tr>
        <th>Summary</th>
        <td>
            AST dump doesn't capture names of fields in designated initializers
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            c++20,
            clang:frontend
      </td>
    </tr>

    <tr>
      <th>Assignees</th>
      <td>
      </td>
    </tr>

    <tr>
      <th>Reporter</th>
      <td>
          Endilll
      </td>
    </tr>
</table>

<pre>
    Consider the following example from [dcl.init.aggr] (https://godbolt.org/z/GahTznz4q):
```cpp
struct C {
  union {
 int a;
    const char* p;
  };
  int x;
} c = { .a = 1, .x = 3};
```
AST dump for `c` is the following:
```
`-VarDecl <line:2:1, line:8:23> col:3 c 'struct C':'C' cinit
  `-InitListExpr <col:7, col:23> 'struct C':'C'
    |-InitListExpr <col:9, col:14> 'C::(anonymous union at line:3:3)' field Field 0xeb0b660 'a' 'int'
    | `-IntegerLiteral <col:14> 'int' 1
    `-IntegerLiteral <col:22> 'int' 3
```
Note that the dump captures the fact that `1` is used to initialize anonymous union member `a`, but doesn't capture that 3 is used to initialize `C::x`.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJx8lEuP4zYMgH8NfSHGUCg_4oMPeWyKAoteuuhdtplEhSy5ktxm59cXsjOZ7GynQGKLpPnxJUmFoC-WuYVyD-UxU3O8Ot9-sYM2xmSdG763B2eDHthjvDKenTHuH20vyDc1Tobx7N2IUO6H3uTa6piry8VDeUSg7TXGKYDcAZ2AThc3dM7E3PkL0OkV6PSLun57ta_FX0BN-kwcQeygEuuvn6ZVE6Kf-4gHhHq_ahBnq519UmgbUYF82BF7Z0PE_qo80A6nJxvUxycped4eMtRH7BHkMbExV8tyA3TA_Las5bP3I9dV3P3-DYd5nPDsPKYKoBKow4-d-7nQh_jyh_JH7g2CPBhtGeSOQO6W8Hd5m3QS5BfsnQG5kylbqt9aBFQv_a7TCvs0kEfVlXj51er4VYf45Tb5FGRl1Im_Llf0Z8D35kJ9-ATWvMM2xR12SIhE2Srr7PfRzeE-QBXfCpPLn5qU91mzGfC0PMWNO9FVlUgglaxAtbbxYzr3-iJf2H_Vkb0y70k9MlkdcfPk-j9uRD-6yf8c3G8uMsarisucl_n3aoqz5_vkVR9XO1Ric98Sc-ABo8M0Ia2MfmX82JuRx46XfaRSLDpgN0ccHAcLVMe3ICtafgKFSty7f4NK5NnQyqGRjcq43dSbopayoDK7tt25qJuu4G1RbgvJw3lb19yIpiBZVhvVZbolQYUohdyIUlCZF9VW9TxIVgXLSgkoBI9Km9yYv8d0yDMdwsxtI5qyzIzq2ITlniHqgfZAexJABHRIGqOWk3H2zka2QzKUx8y3CfbSzZcAhTA6xPCOjzoabh9n7ufGWDVyQHde91NAbXHgdOGpyMNTk3zIZm_aD7eVjte5y3s3Ap1SzPvrZfLuT-4j0GmpLwCdlhL_DQAA__-J9YnM">