[PATCH] D71345: [clangd] Fall back to selecting token-before-cursor if token-after-cursor fails.

Sam McCall via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Dec 12 00:53:46 PST 2019


sammccall added a comment.

In D71345#1780632 <https://reviews.llvm.org/D71345#1780632>, @nridge wrote:

> I tried to do a less general version of this (for go-to-definition only) in D70727 <https://reviews.llvm.org/D70727> :)


Ah, I hadn't seen that. After thinking about this a bit, I think the behavior in that patch is OK, and it's complexity that will do us in. More cases keep coming up - internally people complained about this in code actions which is the hardest case to fix and needs most of this complexity.

How do you feel about the approach here? I like having the description of the problem centralized and directing callsites toward a solution.
At the same time, it does make me sad that a fairly nice abstraction becomes so much harder to pick up and use, the API is pretty horrendous.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D71345





More information about the cfe-commits mailing list