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

    <tr>
        <th>Summary</th>
        <td>
             clangd: renaming class doesn't rename references in 'extern template'
        </td>
    </tr>

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

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

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

<pre>
    ```c++
template<class T> void f();

class A {};  // <--

extern template void f<A>();
```
If I hover over `A` and rename it to `A2` using clangd, the output is invalid:
```c++
template<class T> void f();

class A2 {};

extern template void f<A>();  // <-- undeclared variable 'A'
```
llvm-project version: 16.0.1 https://github.com/llvm/llvm-project/commit/cd89023f797900e4492da58b7bed36f702120011
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJysUs1upDwQfJrm0srIP2DjAwdmkpFy_17A4IbxJwMj24x2334FE5TdaC-RVmo1oK7-qaJsSn6ciRqozlC9FnbNtyU2KUc7Uiy6xf1sQLFn9CDOW7BXYG2m6R5sJpCXPtiU8D-Qb_hYvMMBRA3CgPyAPvMT1SLoM-hXkGdEEFcQVwR5eXn5HUo_MsUZjxXHVHlpQb59HX5c9_x8H_Adb8uDIu4J1A5BOzuMNNuJ0GfMy14QW2VNfh6xD3YeHYgL5hvhsub7mtEn9PPDBu9Atl_W_RMxxKca3-f_p364zo76YCM5fNjobRcIQegWhP6rUiE8ppd7XP6nPuODYvLLDLJFrk7sxPGW8z1ttPcdo8-3tTv1ywTiunV-PI4BIK79Mk1-f3G1YUIO2mjDGJWlEc5Wdac7clINmgkuGOO8cI10RhpbUMNVbZTivOLFrSmNsrIUXWU0M4L33cDJ1uT6UgxlVanCN4IJyTSvmeKG8xMZbrqeyZqTUs70UDKarA-n7cbTEsfCp7RSo6SRugi2o5AOy8dmJ9KtY4KSBZ9y-mzLPgdqDnfI9umhD8OkhG6hNIPQ-TBXpIEizT1t1tn0__IvQehijaH5trw7gQTiunP4FQAA___I_BaC">