<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/69166>69166</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
[clangd] "Find all references" reports an off-by-one-line location
</td>
</tr>
<tr>
<th>Labels</th>
<td>
clangd
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
Endilll
</td>
</tr>
</table>
<pre>
When searching for all references of `clang::TypeAlignment` declared in `Type.h`, clangd reported wrong location for the (sole) result from `SemaType.cpp`. In the following snippet, `sizeof(LocInf` is highlighted as a result of the search instead of `TypeAlignment`:
https://github.com/llvm/llvm-project/blob/5857fec27fe8ee5a48a2ee48a4d79a9e39b0332b/clang/lib/Sema/SemaType.cpp#L6687-L6688
I'm using VS Code 1.83.0 with clangd extension version 0.1.24.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyUUkFv3CwQ_TX4gtbCg43h4MN-yWcpUm6p2jO2B5uKBQvYpOmvr_BuUim3XhghmDfvvXk6Jbt6xIF0_5HusdLXvIU4_O8X65yrprC8Dz829DShjvNm_UpNiFQ7RyMajOhnTDQYSgSbnfYr4WfCz9_edzw7u_oL-kwEowvOTkdcqPXla3mvNyIYgQd69C004h5ixoW-xeBX6sKssw3-mJc3pARkCg4JKBoxXV2mJoZLQXvBiz4Q530ngtX0yR8dJjgX3grn5O2-Yy7TiGDJ_sZgCMjnMD95U_jZRDe7bs6uW6GgE9UfU4I5wG4GUOtTRr3cJX_VWdSzR8LOW857KjcYCYyrzdt1qudwITA69_pRTnsMP3HOBMbJhYnA2MmuNzhDb1AidrqVGhBbqdulV1ohVxPjHMrXm90wOltuxYN7-bQC-LMQsj-VU9543c4nAv2FXlOx5vsLfQgL0qaWvGb0zebtYyP4K6NPZQevGI_K6qaGtq6WgS-KK13h0AjVt20nW1VtQ98IMUmASWlpuGKq4d3Cu0ZOoAClquwADHjDGsFk2zJVC8VM28AMDSLjvSAtw4u2ri7-1CGulU3pioNQjRCV0xO6dIQV4MaSAJTgxuEwdLquibTM2ZTTX4hsszsifm_pHikBGK1fviSZANxzmKj2NBhzmt5PwePJWY-fmayu0Q3_vOJDSCIwHlr-BAAA__8sKRyK">