kadircet added a comment.

In D72500#1813975 <https://reviews.llvm.org/D72500#1813975>, @sammccall wrote:

> Basing this on the hover for the type doesn't seem right. e.g. `int` should 
> be the `Type` rather than the `Name`.
>
> Rather than printing the value if evaluable, I think we should only show the 
> hover if evaluable. There's a cost to showing it and the value of just the 
> type doesn't seem clearly high enough.
>
> I think we should avoid triggering for literals. Maybe some exceptions, but a 
> hover saying that 0 is an int with value 0 seems silly.


agreed.

In D72500#1815780 <https://reviews.llvm.org/D72500#1815780>, @lh123 wrote:

> In D72500#1813975 <https://reviews.llvm.org/D72500#1813975>, @sammccall wrote:
>
> > I think we should avoid triggering for literals. Maybe some exceptions, but 
> > a hover saying that 0 is an int with value 0 seems silly.
>
>
> Hovering over `IntegerLiteral/FloatingLiteral` may be useless, but I think 
> it's useful when hovering over 
> `StringLiteral/UserDefinedLiteral/CXXNullPtrLiteralExpr ...`.
>
> - `"hello"` -> `char [6]`.
> - `nullptr` -> `std::nullptr_t`.
> - `1i` -> `std::complex<double>`.


I believe all but the first case seems redundant. So I am only keeping the 
StringLiterals and dropping the rest.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D72500



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to