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

    <tr>
        <th>Summary</th>
        <td>
            clang-format misplaces `*` in declaration of pointer to struct
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            new issue
      </td>
    </tr>

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

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

<pre>
    Our code in BIND is auto-formatted with clang-format using [a .clang-format configuration](https://gitlab.isc.org/isc-projects/bind9/-/blob/main/.clang-format) that includes `PointerAlignment: Right` and `PointerBindsToType: false`

When I run the following on the command line:
```
$ echo 'struct { int foo; } *foop;' | clang-format
struct {
        int foo;
} * foop;
```
I get a space before `foop`, where I expected the last line to be `} *foop;`
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJxtU8uu2yAQ_Rq8GcVyIE7ihRfJjSpl01bVlbrGeLCpMFgGN71_38FOlKathAzzOmdgjhvfftRf5gmUbxGMg_P18wVMADlHv9F-GmSM2MLNxB6Ula67O2EOxnXAyrOE_CWgvNOmmycZjXesvDB-7GMcAxMnxj_R6ky0sslNULmfOnLQaTNO_geqGMhsjGsr2jfpbH1D2yCNo-2FiPEKYk-Exik7txiA7Yuv3riI08mazg3oIpHCN9P1kWIgXftHzplowrt__xgxZWlpA1KUFRdWnNbv9x4dXGGaHTEhaG-tv6Vr-9Wh_DAkUGtcwriXEsa6VpPvAFXvgfFDiNOsIrDDmZqOhOeZOJN5oeCJrJFMSiPP28tjr0jP6keP1RPl7lqh4IH1v4au0GEECWGUCqFBosD0LEsNJfE3uPVIvivgr5FmQuNPl7UyxOWmED2VpZK_Ot8XWVuLthKVzCINGesXYQwmjJY4l0FRWRoJKa5FylrVAl7DuE4nkawXzubJ1v8oqJ-bnJ6fDGt_PraHihZNhRmTmsryuC2yvj7ySuwUl5XUpVKSoz5sD4UWal_pFkWbkSbRhpoUzTh3eIMFgs6k4czUvOC82BfbLd8Jvs_LnRKFOPKiUpU4aMF2BZJKbZ76SLrOpnppqZm7QEFrQgzPoAyBFIq40BE-_W69n2otnebZQlwvjf8G9nUj_g">