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

    <tr>
        <th>Summary</th>
        <td>
            Formatting does not work in the if statement in the λ expression to the right of the assignment statement
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
      </td>
    </tr>

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

    <tr>
      <th>Reporter</th>
      <td>
          Silver-Fang
      </td>
    </tr>
</table>

<pre>
    This issue is redirected from [vscode-cpptools](https://github.com/microsoft/vscode-cpptools/issues/12382)
```C++
std::function<void()> A;
std::function<void()> *B;
B = &(A = [&B]()
         { if(B)B=nullptr; });
```
Formatting should add spaces to B=nullptr in the last line. But in fact, spaces are not added after formatting:
![image](https://github.com/user-attachments/assets/e1ee712b-8ee0-46ab-904b-003071f15980)
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyMU1uOozoQXU3xYxGZcnh98BEnnQ3cuwGDC_C9Bke2yczsfmSYdLf6Y2YkS5SLOvU4x6VCMNNK1EEpobxlaouz890_xj7J53e1Tlnv9I_u39kEZkLYiJnAPGnjaYik2ejdwqCUzzA4TfnweETnbIDyBtjMMT4CiAvgHfA-mThv_WlwC-B9MYN3wY0R8P4Vi_e9UjIKFA0CtsBvwC9Q8eNcAWU6uzdEnWqIy7itQzRuBXF9OqMBm4QUb-wC4q9jAS_yPVwyEDcGWAE2l8MuJWAlj_k-GuMtg1oyMwI2ErCVIG7rZu0jehCSQX3b08svcxzXu_OLitGsEwuz26xmSmsWHmqgwKJjn5Ixs7I4E7MqRGbNSicmt5i8oxoi4PUFU57Y6mLKRJqpMZJn43udxMHRCRZQSrOoif4o2RbI5ypGNcwLrTHJo0Kg3aCCqC6wzxsinp8r1ectP_c554LXxViUbcMB20x3QreiVRl1RY2VqOqybbK5QxSiKs_9MI5Y1Fpxqvp-UK2uq6YvhiYzHXI887YoOQpRNCfe9jVhfUZBxdjyAs6cFmXsydrncnJ-yvZH1BW8qbHOrOrJhtcz912KyvttCnDm1oQYPnDRREvdJ1G0o7CT-c35_18KmJGFqCIlKl4-uL6BlIy-PzyFYNya1Es_vJnmyNy4X46d23HvGbLN2-433Kfmfn3yh3f_URL705ocQz47_BkAAP__PegsDw">