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

2023-06-05 Thread Sam McCall via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG4cb5e436ae71: [clangd] Show size, offset and padding for bit fields on hover (authored by SR_team, committed by sammccall). Repository: rG LLVM Gi

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

2023-06-05 Thread SR_team via Phabricator via cfe-commits
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 rende

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

2023-06-05 Thread Sam McCall via Phabricator via cfe-commits
sammccall accepted this revision. sammccall added a comment. This revision is now accepted and ready to land. Sorry for the delay, I've been out on vacation. Behavior looks great and isn't too complicated :-) Let me know if you have commit access or I should land this for you (in which case: ple

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

2023-05-27 Thread SR_team via Phabricator via cfe-commits
SR_team added a comment. @sammccall review my code please CHANGES SINCE LAST ACTION https://reviews.llvm.org/D151128/new/ https://reviews.llvm.org/D151128 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailma

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

2023-05-23 Thread SR_team via Phabricator via cfe-commits
SR_team updated this revision to Diff 524946. SR_team added a comment. Extract formatting to lambda, for simplify code modification 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

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

2023-05-23 Thread SR_team via Phabricator via cfe-commits
SR_team updated this revision to Diff 524938. SR_team added a comment. Stores `Offset`, `Size` and `Padding` fields of HoverInfo in bits. When hover present bits converted to bytes, if possible. Examle: struct test { char a; char b : 3; char c : 5; int d;

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

2023-05-23 Thread SR_team via Phabricator via cfe-commits
SR_team updated this revision to Diff 524933. SR_team added a comment. Stores `Offset`, `Size` and `Padding` fields of HoverInfo in bits. When hover present bits converted to bytes, if possible. Examle: struct test { char a; char b : 3; char c : 5; int d; };

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

2023-05-23 Thread SR_team via Phabricator via cfe-commits
SR_team added a comment. In D151128#4365218 , @sammccall wrote: > I do see the appeal of making this work for bitfields, but I think silently > rounding offset/size/padding to whole bytes is pretty misleading. > For bitfields we'd really need to talk abo

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

2023-05-23 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a comment. I do see the appeal of making this work for bitfields, but I think silently rounding offset/size/padding to whole bytes is pretty misleading. For bitfields we'd really need to talk about layout at a bit level. But we don't want to talk about regular fields in bits (I th

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

2023-05-22 Thread SR_team via Phabricator via cfe-commits
SR_team created this revision. SR_team added a reviewer: sammccall. SR_team added a project: clang-tools-extra. Herald added subscribers: kadircet, arphaman. Herald added a project: All. SR_team requested review of this revision. Herald added subscribers: cfe-commits, MaskRay, ilya-biryukov. In so