In the following code:
int next;
template <typename T>
struct Link {
Link<T> *next;
};
template <typename T>
void foo(Link<T> *link) {
link->next->next;
}
HeuristicResolver is able to resolve the first next in link->next->next, but not the second.
This can be seen in clangd: go-to-definition on the second next will also offer the unrelated global variable as a result, indicating that it's falling back to the textual heuristic because semantic resolution failed.