3 ms·
clang-tidy has an extension to do just that: https://clang.llvm.org/extra/clang-tidy/checks/altera/struct-pack-align.html https://clang.llvm.org/extra/clang-tid
by ComputerGuru 2y ago
clang-tidy has an extension to do just that: https://clang.llvm.org/extra/clang-tidy/checks/altera/struct-pack-align.html https://clang.llvm.org/extra/clang-tidy/checks/altera/struct... -- I think there are other clang-tidy padding-related checks that apply here as well, iirc.
Also, not what you asked but certainly related, some lower-language levels (not just jit languages) can and do automatically re-arrange struct members (when not optionally fixed); e.g. by default rust will rearrange members as needed to optimize padding.