[PATCH] D71598: [clangd] Filter implicit references from index while renaming

Haojian Wu via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Dec 17 06:12:49 PST 2019


hokein added a comment.

(apologies, the FIXME may imply this approach...)

this approach is based on an assumption: the index results are matched to the latest file content, but this is not always true in practice, our index maybe stale (index results came from an old snapshot of the file), then this approach will fail.

I think we should do it in another direction:

- add a new `RefKind` (something like implicit references, or named references) to `clangd::Ref`
- when querying the index for rename, we set a corresponding `Filter` in the query request (or filter out non-interesting references based on the `RefKind` afterwards)


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

https://reviews.llvm.org/D71598





More information about the cfe-commits mailing list