[clangd] Fix hover crashing on integral or enumeral casts
authorGeorg Kotheimer <gkll@mailbox.org>
Mon, 5 Sep 2022 09:14:27 +0000 (11:14 +0200)
committerSam McCall <sam.mccall@gmail.com>
Wed, 7 Sep 2022 14:43:22 +0000 (16:43 +0200)
commit72142fbac496a66769e16c80b076216d7c449ab2
treeac79be0f8bb6dc877a3fcd4fef9e2b444110422f
parent8af74da5bdbdccf13de84a4610ef75cd3dbac09e
[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
clang-tools-extra/clangd/unittests/TestTU.cpp
clang-tools-extra/clangd/unittests/TestTU.h