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

    <tr>
        <th>Summary</th>
        <td>
            unexpected formatting on empty lines
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            c++,
            clang-format
      </td>
    </tr>

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

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

<pre>
    command `clang-format --lines=2:2 a.cc`

actual formatting:
```cpp
void f() {
 
}
```

expected formatting:
```cpp
void f() {}
```

this seems to be WAI if there are tokens on line 2, e.g:
```cpp
void f() {
 return;
}
```

gets formatted as `void f() { return; }`.
</pre>
<img width="1" height="1" alt="" src="http://email.email.llvm.org/o/eJyUkt-K5CwQxZ-mciMdjP86ufAi_TUN3xPstdHqxB0Tg5pm5-0Xe2aZYZmFXSgQy8OPOscyOft5Q9QgLyCvjTnKEpN-Mc4ni6WZonvVNq6r2RwBRW0w23y6x7SaQk6n4DfMwK8M-MiIaa0FRYGOQEdjy2ECeZMWv83Aa7u-P8vuO9DxEb0jd2A9sIHA-QJ0JFV1vn7WvhHxx462oPtn5lewsvhMMuKaSYlkQvJt_J_4OykLJiQmISnxBbdM4kaqS8KA_Uew_XsbCcuRNuCXP_mZseRfXtARk2vAv5M-MKRCFG0bp7kb-GAa1N1ZKCWk6GWzaOeUMJPshGHCcsW6c2c5V0bIYRJ4V43XjDJJJT13Q9dT2XKnBJVOOW57OmEPguJqfGhDeKxtTHPjcz5Qd7wfBGuCmTDk56owZoFdnlWDqfdPm1Gb8tokXTmn6ZgzCBp8LvmDXHwJqI_ti1-tmeO6l9dn8rk5UtBLKXuu2bMbsNvsy3JMrY0rsFtFvh-nPcXvaAuw23PyDOz2PvxDs58BAAD__xk43B4">