[clangd] Fix hover crashing on integral or enumeral casts
authorGeorg Kotheimer <gkll@mailbox.org>
Tue, 31 May 2022 19:57:51 +0000 (21:57 +0200)
committerSam McCall <sam.mccall@gmail.com>
Tue, 31 May 2022 20:05:23 +0000 (22:05 +0200)
commitce5ebf0b9113df8ccaec1bcfd6804fb16cdef69d
tree964164115cb63afc10be9a6383c867e82b85f5f4
parent8fb1bef60f0bf2f7d8bcb7069f3f543c02248ac9
[clangd] Fix hover crashing on integral or enumeral casts

When pretty printing the value of an expression, we cannot infer from
the type of the expression the type of the constant that the expression
evaluates to, as the expression might contain a type cast.
clang-tools-extra/clangd/Hover.cpp
clang-tools-extra/clangd/unittests/HoverTests.cpp