kbobyrev added a comment. In D71598#1787806 <https://reviews.llvm.org/D71598#1787806>, @hokein wrote:
> (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` aftjerwards) I think this approach would also fail for stale index, wouldn't it? I can totally understand why that might be slightly better for performance, but if we have no guarantees that our index is aware of implicit references and would not be able to mark those in the first place, this implementation would shield us from that. Anyway, I am happy to learn more about why the proposed approach might be better, but I do not fully understand the concern here. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D71598/new/ https://reviews.llvm.org/D71598 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits