Issue 124450
Summary HeuristicResolver cannot resolve chained dependent field access
Labels clang:frontend
Assignees HighCommander4
Reporter HighCommander4
    In the following code:

```c++
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.
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to