[PATCH] D116618: [clangd] Use the localSourceRange as the default claimed range for typelocs.

Sam McCall via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Jan 4 14:21:04 PST 2022


sammccall added a comment.

In D116618#3220744 <https://reviews.llvm.org/D116618#3220744>, @sammccall wrote:

> - claim their full range, but in the opposite order (parents before children)

To refine this a little more, for declarator type nodes:

- first, we should recurse into non-declarator children (such as array bounds and function parameters) and let them claim tokens
- then we claim the range
- then we recurse into declarator children

That said I think it's probably not worth it, there are only a few declarator nodes and the approach of not claiming the gap seems simpler.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D116618



More information about the cfe-commits mailing list