[PATCH] D146874: [clangd] Fix a hover crash on unsigned 64bit value
Nathan Ridge via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Sun Mar 26 01:07:28 PDT 2023
nridge added inline comments.
================
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) {
----------------
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
================
Comment at: clang-tools-extra/clangd/unittests/HoverTests.cpp:2953
+ constexpr unsigned long value = -1; // wrap around
+ void foo() { va$1^lue; }
+ )cpp");
----------------
you can just write `va^lue` and access it as `T.point()`
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