[PATCH] D82739: Improve heuristic resolution of dependent types in TargetFinder

Haojian Wu via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Jul 6 12:54:10 PDT 2020


hokein added a comment.

looks like we use this heuristic for go-to-def, I think we might want to use it in more places, e.g.  libindex (for xrefs), sema code completion (so that `this->a.^` can suggest something).



================
Comment at: clang-tools-extra/clangd/FindTarget.cpp:198
+    // analyzing it.
+    if (E && BT->getKind() == BuiltinType::Dependent) {
+      T = resolveDependentExprToType(E);
----------------
I think this is the key point of the fix?

It would be nice if you could find a way to split it into two (one for refactoring, one for the fix). The diff of this patch contains large chunk of refactoring changes which make the fix less obvious.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D82739/new/

https://reviews.llvm.org/D82739





More information about the cfe-commits mailing list