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

Sam McCall via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue May 23 10:22:38 PDT 2023


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 think?!)
And having a mixture seems like it's going to be pretty complicated both in implementation and for users, for a smallish feature.

I don't see a great sweet-spot design, maybe you/others have ideas (or can explain why the rounding behavior in this patch is reasonable.


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

https://reviews.llvm.org/D151128



More information about the cfe-commits mailing list