Index: unittests/clangd/XRefsTests.cpp =================================================================== --- unittests/clangd/XRefsTests.cpp +++ unittests/clangd/XRefsTests.cpp @@ -350,6 +350,30 @@ FF(); void f() { T^est a; } )cpp", + + R"cpp( + template + struct Foo { void bar() {} }; + + template <> + struct [[Foo]] { void bar() {} }; + + void foo() { + Foo abc; + Fo^o b; + } + )cpp", + + R"cpp( + template + struct [[Foo]] { void bar() {} }; + template <> + struct Foo { void bar() {} }; + void foo() { + Fo^o abc; + Foo b; + } + )cpp", }; for (const char *Test : Tests) { Annotations T(Test);