[PATCH] D83508: [clangd][Hover] Don't use Decl if it is not related with tokens under cursor.

Kadir Cetinkaya via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Jul 16 04:04:43 PDT 2020


kadircet added a comment.

In D83508#2155322 <https://reviews.llvm.org/D83508#2155322>, @sammccall wrote:

> Yeah that makes sense, I guess it just says nothing is selected in that case?
>  Selecting the `while` is probably marginally better for that exact case, but selecting nothing seems fine to me.
>
> @kadircet any concerns with that "regression"?


I think I am fine with selecting nothing in that case, selecting some part of the AST that's not visible(even as hint, it is coming from another file could've been anything right?) to developer doesn't seem so important.
It is also inconsistent, we show the while stmt only on filename and not on any other part of the directive, moreover if you put a function decl instead of a whilestmt, we again don't have a selection even on the filename :(
So i think that might not even be a regression.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D83508





More information about the cfe-commits mailing list