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

Vlad Serebrennikov via llvm-commits llvm-commits at lists.llvm.org
Fri May 16 01:54:38 PDT 2025


Endilll 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;
      |                ^
```

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


More information about the llvm-commits mailing list