[PATCH] D51279: [clangd] Implement findOccurrences interface in dynamic index.

Haojian Wu via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Aug 28 00:20:45 PDT 2018


hokein added a comment.

In https://reviews.llvm.org/D51279#1214268, @ilya-biryukov wrote:

> Just noticed I'm not on the reviewers list, sorry for chiming in without invitation. Was really excited about the change :-)


Comments are always welcome :)



================
Comment at: clangd/index/Merge.cpp:88
+    // in seen files.
+    // FIXME: If a file has been updated, and there are no occurrences indexed
+    // in dynamic index, stale results are still returned (from static index).
----------------
ilya-biryukov wrote:
> Do we want to fix it before checking this in? As discussed offline, this seems to be a limitation that could affect the design (FileOccurrences vs SymbolOccurrence in the symbol interface). In case we want to avoid refactoring the interfaces later.
Yes, I re-thought it afterwards. We could solve this issue for `findOccurrences` by redefining the interface.

Unfortunately, we have the same issue for `fuzzyFind`, `lookup` too -- we still return the stale symbols from static index if the symbol was deleted in dirty files. I think we should address this issue thoroughly and separately -- we probably want to add a method in dynamic index for query whether a file is in.


Repository:
  rCTE Clang Tools Extra

https://reviews.llvm.org/D51279





More information about the cfe-commits mailing list