[llvm] Add -Wms-bitfield-padding warning when possible (PR #139828)

Oliver Hunt via llvm-commits llvm-commits at lists.llvm.org
Fri May 16 01:58:13 PDT 2025


ojhunt wrote:

> In addition to all targets, I also built clang-tools-extra, and there's a warning there:
> 
> ```
> /home/user/endill/llvm-project/clang-tools-extra/clangd/FuzzyMatch.h:128:12: warning: bit-field 'Prev' of type 'Action' (aka 'bool') has a different storage size than the preceding bit-field (1 vs 4 bytes) and will not be packed under the Microsoft ABI [-Wms-bitfield-padding]
>   128 |     Action Prev : 1;
>       |            ^
> /home/user/endill/llvm-project/clang-tools-extra/clangd/FuzzyMatch.h:127:16: note: preceding bit-field 'Score' declared here with type 'int'
>   127 |     signed int Score : 15;
>       |                ^
> ```

ah ha, thank you!

https://github.com/llvm/llvm-project/pull/139828


More information about the llvm-commits mailing list