<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/59178>59178</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
clang-format 15 has no effect for simple functions with --lines (works with clang-format 14)
</td>
</tr>
<tr>
<th>Labels</th>
<td>
new issue
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
sean-mcmanus
</td>
</tr>
</table>
<pre>
The same bug repros with the code below when formatting the 2nd function only.
```cpp
int a()
{
return 0;
}
int b()
{
return 0;
}
```
with a command line like "clang-format test.cpp --style="Mozilla" --lines=5:10" and it works with clang 14.
A similar (or the same issue) was reported at https://github.com/llvm/llvm-project/issues/58464 with slightly different repro code, but the root cause could be the same.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJylU82SoyAQfhq8ULEAfxIPHpJN7W1u-wIorTKDkAIcK_v02xKTnd3b1paUAg3d30_bOXVvf0xAg5yBdstIPdy8C3TVcaIRA71TGADjVrpOYOng_Cxj1HZMYWEVHRbbR-0sddbcc8KuhJ1JzR6jv90eO9pGKok4EdHsR46Xx8RDXLyljBSXZ-S6T143u3-9-az_NVEiJZHSPEvEbbQFfH0AJUL0Rtrx8GBHI4SYI3J6OIR4N0CKKx55cz-1MchB4P52OeB-RYozZ9vellJHujr_seuXclJe5l9BnGnQszbSY9WT80nFpL4OYQHkSFcZNhucj6AooplivGGpMxHfcYyYeelyJIELYz6fnwP69g59xGXKFHBSncq6fGAJRo9TNHeq9DCAB9Q0WZ0MJuIbmh8TFu9cpL1cwub9YhSa_8K4E8mg5XXdiLJmFc9UW6imaGQWdTTQ_iEkr-iEbKyjgFX7uLXPxv9m4NU2u1i7pJsqf0v4ylaiPNniTfsfkjT8eMqmtpG1KmpWH7uiGbqu7EFUCgZR96XifcEzI7HrQ0uqC5prYX36I0h1zXQrmBCciwKfY8HzE2MVcK5YN3THjgMpGcxSm3zDkTs_Zr5NkPAfCxg0OsTwOyhD0KMFSOUwv1zi5HwbQNrD3GO3LiFL9duE_xcsnyrr">