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

    <tr>
        <th>Summary</th>
        <td>
            [clang-tidy] -lines not work properly
        </td>
    </tr>

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

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

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

<pre>
    Our team's codebase has million lines of code, so we adopted clang-format via an adaptive way: only reformat lines involved in the new commits.

But we found `-lines` seems not work properly.

<img width="773" alt="image" src="https://user-images.githubusercontent.com/2892107/208156566-0309ede6-2840-4a05-b24c-ea0da615f065.png">
<img width="663" alt="image" src="https://user-images.githubusercontent.com/2892107/208156580-d07a1ce1-5726-4cf0-977b-97da96e5a3e4.png">
<img width="665" alt="image" src="https://user-images.githubusercontent.com/2892107/208157189-a502bb3d-3d14-497e-a8ee-ce93676ab710.png">

The problem can be reproduced using `clang-format version 14.0.6` or the newest code(version 16) compiled from master.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJy8VMGu6yYQ_RqyGWEBNmAWXtz3brPtpj8wNhOHFhs_wIny95WT-1pdXVXqpt2M7fGZ4Yg5Z7CUMK9EA9PfmH4_4V6vKQ8_fgRc5_t-GpN_DL_uGSrhwpQtMCVPIxaCKxZYQowhrRDDSgXS5fmXqe9QEtwJ0Ketkocp4jrzS8oLVrgFBFwBPW413Aju-GDtG6Q1PiDTB-jVMKy3FG_kIaxQrwQr3WFKyxJqaZh4Z-LtFb_t9TjukvbVAzOCP8uZEVCIlgJrqnBP-Q_Yctoox8enatZ-D8sM9-DrlbXvTClrW6YUYKyv77DgTEem5OmVuda6Fda-MXVm6rwXyvwJKs0c6nUfj8yU1kprbaa0MHVWvVNS2ONN9FIbbQwXrXDkyXDVd4J3KDQfVTdxQuHRSH0RRjfbOjOlWPvLP7E15n9g2wvuhUU5keTaKsO76SK4s3bkznp0hjS21P0btvq_Zmtl7zhqocax9bz1suOds8SxJ-ITudZYg6OV4gvbZ_ztSodQxkgLTLjCSJBpy8nvE3nYS1jnQ2SfRU25HEaQXSMacygv5Z-SpVI_fNH_BTNMuUPKW4jk4ZLTAguWSrk5-aH1rnV4okEaK5VU2rnTdbCuJ-M67XAaR-ztpb1MveyV7zxqT-YUBiWUkkoaabtWuqaXvu20k9hPZDtJrBO0YIhNjLelSXk-hVJ2GrTT2pwijhTLz0WQhwPEx30urBMxlFr-LquhxufKeN1BDf7B9Du8bPfVbac9x-HzVF-T_Bjf0ffjwbecfqepMnV-citMnZ_0_gwAAP__irRxPg">