[PATCH] D146874: [clangd] Fix a hover crash on unsigned 64bit value
Younan Zhang via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Sun Mar 26 05:04:15 PDT 2023
zyounan marked 2 inline comments as done.
zyounan added a comment.
Thank you!
================
Comment at: clang-tools-extra/clangd/Hover.cpp:396
// -2 => 0xfffffffe
-// -2^32 => 0xfffffffeffffffff
+// -2^32 => 0xffffffff00000000
static llvm::FormattedNumber printHex(const llvm::APSInt &V) {
----------------
nridge wrote:
> Just to make sure I'm not missing anything: this comment change is just fixing a pre-existing mistake in the comment (-2^32 was already printed as 0xffffffff00000000), right? i.e. this patch doesn't change how any number is printed
No, the patch doesn't change the behavior of the function. `0xfffffffeffffffff` actually stands for `-(2**32 + 1)`. :D
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D146874/new/
https://reviews.llvm.org/D146874
More information about the cfe-commits
mailing list