This is an archive of the discontinued LLVM Phabricator instance.

[clangd] Add hexadecimal member offsets and sizes to hover popup
Needs ReviewPublic

Authored by tetraxile on Aug 6 2023, 1:59 AM.

Details

Summary

This changes the formatting of class/struct member variable byte offsets and sizes, as well as class sizes, from just the decimal value, e.g. "Offset: 12 bytes", to both decimal and hexadecimal, e.g. "Offset: 12 (0xc) bytes".

I'm open to adding a config file option to disable this feature if users want to reduce clutter, but I think it'd be unnecessary, as the other lines in the hover popup (declaration, type, comment) are already quite a bit longer than the offset and size lines.

Diff Detail

Event Timeline

tetraxile created this revision.Aug 6 2023, 1:59 AM
Herald added a project: Restricted Project. · View Herald TranscriptAug 6 2023, 1:59 AM
tetraxile requested review of this revision.Aug 6 2023, 1:59 AM

Until a 10, we don't have difference between DEC and HEX, may be print only DEC in these cases?

tetraxile updated this revision to Diff 547595.Aug 6 2023, 11:17 AM

Thanks for the suggestion SR_team, I've just added that.

nridge added a subscriber: nridge.Aug 12 2023, 2:30 PM

Just bumping this patch, I'd like if it could get reviewed before Phabricator becomes read-only.

bumping again