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

    <tr>
        <th>Summary</th>
        <td>
            Incorrect clang-format PointerAlignment for brace-enclosed initialization within if-statement
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            clang-format
      </td>
    </tr>

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

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

<pre>
    I can confirm this behaviour and would like to gently bump this report.

```cpp
if (MyClass * obj{GetMyClass()})
```
But - for some reason - `auto` and primitive-types seem to work as expected:
```cpp
if (auto* obj{GetMyClass()})
```
```cpp
if (int* obj{GetInt()})
```

I have reproduced that in clang-format:
* 17.0.3 (packaged with VS)
* 18.1.3 (and other versions via clang-format-configurator.site)

The only config option I changed:
> PointerAlignment: Left

(This issue has been split from #60146 )
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJycU12L6zYQ_TXyy2Ajy98PftjtNiXQQqGXvsvy2NZdWTLSOGn664ucQBpKWbhgxkiMzpw5c0aGoGeL2LPqnVUfidxpcb4PV2k-LfpkcOOtP4OSFpSzk_Yr0KIDDLjIi3a7B2lHuLrdjGD0JwI5mNGSucGwr9s92ePmPGWMfzD-9og1v39q2-43egIm2t9uPxkZAjDxBm74zpr3X5Ael0y0THSs-YjxFeV-fN8JUpich-BWBI8yOAspsJrLnRyr-cF283rVpC-Y0m3DAAFxjbyvzn-CDIB_bagIR1Z8QfYA_RGi_weoLb3gneP5K6wjnmGRl9jy5t24KxyBFkmgLSgj7ZxOzq-Snh2JN8ibjGdFLLtJ9SlnHOGqaYE__3iWimltlt_TonaOFvRwQR-0swEuWr4USA-TzLuX5HwWNOET64jfFgRnze3uphncRtpZOINapJ3_rXnxM_zutCX0b0bPdkUb6cOvONGLkUT7LXpMh7AjLDJaEy2EzWiCybsVmChqnpc1MNElY1-MXdHJBPu8EXXL27yqkqXHespVWwqVSz5J3kneqKFt6mLgDVZlmehecFHyTnBeVlVVZaITzaDENHaSd21Ts5LjKrXJjLmsmfNzclDqc94VTZ4YOaAJx5oJ8TITIeLi-T6-S4d9DqzkRgcKTyTSZLA_W-W8R0Uvkv9HpWMBBi8VpmiVcQFH0FaTlkb_LQ-545y1BT2lgSRhfJXs3vQL0RbiCMSJidOsadmHTLmViVPk8vilm3ffURETp6PFwMTp0eWlF_8EAAD__1k3U_4">