[PATCH] D72874: [clangd] Add a textual fallback for go-to-definition

Nathan Ridge via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Mar 12 13:01:34 PDT 2020


nridge marked an inline comment as done.
nridge added inline comments.


================
Comment at: clang-tools-extra/clangd/XRefs.cpp:436
+    if (ScoredResults.size() >= 3) {
+      // Assume we don't have results from the current file, otherwise the
+      // findNearbyIdentifier() mechanism would have handled them.
----------------
nridge wrote:
> Oh whoops, this assumption is another dependency on `findNearbyIdentifier()`
For now, I just had it restrict to 3 results in general (even if they're in the same file).

Once `findNearbyIdentifier()` lands, the behaviour will automatically become what we intended.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D72874





More information about the cfe-commits mailing list