[PATCH] D44247: [clangd] Use identifier range as the definition range.

Sam McCall via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Mar 8 07:32:18 PST 2018


sammccall added a comment.

In https://reviews.llvm.org/D44247#1031345, @malaperle wrote:

> I was going to change the symbol index to do the opposite :) The range of definitions including the bodies of functions, etc is used in a "peek definition" feature by several LSP clients. So for example in VSCode, you can hold Ctrl and hover on a function call and see its definition in a popup. There was some discussion about this in https://reviews.llvm.org/D35894


Interesting - that seemed like a more natural interpretation of LSP to me.
Others talked me down, motivated (I think) by nicer behavior of jump-to-definition... will bring it up again :)


Repository:
  rCTE Clang Tools Extra

https://reviews.llvm.org/D44247





More information about the cfe-commits mailing list