[PATCH] D151128: [clangd] Show size, offset and padding for bit fields on hover

SR_team via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Jun 5 08:38:19 PDT 2023


SR_team updated this revision to Diff 528458.
SR_team added a comment.

- moved lambda `FormatSize` to static function `formatSize()`;
- extracted offset format code to static function `formatOffset()`;
- always shows bytes in offset (for offset 4 showed `Offset: 0 bytes and 4 bits`)
- added render test for bit-fields

> Let me know if you have commit access or I should land this for you (in which case: please provide a preferred name/email for attribution)

Land it for me, please. Name: SR_team, email: me at sr.team


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

https://reviews.llvm.org/D151128

Files:
  clang-tools-extra/clangd/Hover.cpp
  clang-tools-extra/clangd/Hover.h
  clang-tools-extra/clangd/unittests/HoverTests.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D151128.528458.patch
Type: text/x-patch
Size: 8785 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20230605/fc8a3b17/attachment-0001.bin>


More information about the cfe-commits mailing list