In the following code:
struct Cat {
void meow();
};
struct Unrelated {
void meow();
};
template <typename T> Cat foo(T);
template <typename T>
void bar(T t) {
auto cat = foo(t);
cat.meow();
}
go-to-def on the meow token in cat.meow offers both Cat::meow and Unrelated::meow as candidates, suggesting that it's falling back to the textual heuristic.
This is a variation of the test case fixed in #897, but unlike the variation in llvm/llvm-project#124445, I don't think this case should require Sema to handle. Also, code completion handles this case fine (completion at cat.^ offers meow), suggesting that this is somehow a deficiency in the go-to-def codepath compared to code completion.