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

    <tr>
        <th>Summary</th>
        <td>
            Backport ef5217b3c0dcbb58927fe43400b6d1faa677bf98 to 17 release
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            release:backport
      </td>
    </tr>

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

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

<pre>
    [clang][Diagnostics] Fix wrong line number display ([#65238](https://github.com/llvm/llvm-project/pull/65238))

When the caret location is lower than the lowest source range, clang is
printing wrong line numbers. The first line number should consider caret
location line even when there are source ranges provided.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyUks1u3SAQhZ8Gb0a9wmD8s_Ai6ZWfoFLX_IxtWgIWg5OmT1_Zvm0VdVUJgRDDxznM0UR-iYgjU89M3Su9lzXlcdU_04oBS2WSez8ObdBxYerO1PPd6yUmKt4SU3eY_A94yykuEHxEiPuLwQzO0xb0OzDRH2ghWyVkfwBEv5ayEZNPTExMTIsv625uNr0wMYXw-nv5tOX0DW1hYtr2EJiYLoQYjsHvjD9d89cVI5QVweqMBUKyuvgUwROE9IYZyqqvgmNLBSjt2SJkHRdk4jOc3sDThduyj8XH5V9TdIMvK8LsM5UPZmlNe3BgUyTvMF9CLtofNWc9vmKEt4fejKAzflBDsOX06h26W-VG6QY56ArHuh1kPwx13VXrqGblrJsNdqbltm2l4e3ccekcF5bXqvKj4ELygSveyVp1t9m2ymLd1nIesHGSNRxftA-345tvKS-VJ9pxbJXkTRW0wUBnIITIGFATMvlktP2-pVyYEEdQ8nj2yOwLsYYHT4X-4oovAcfnxw3AWYm6M9JyZ41R_SC6GRvZcG5aV89at11n5qGHkqDu4PFmtecw_ndUTid0hkXy5lcAAAD__xMa71M">