[clang] Add an off-by-default warning to complain about MSVC bitfield padding (PR #117428)
Oliver Hunt via cfe-commits
cfe-commits at lists.llvm.org
Tue Mar 25 09:11:37 PDT 2025
================
@@ -631,6 +631,7 @@ def Packed : DiagGroup<"packed", [PackedNonPod]>;
def PaddedBitField : DiagGroup<"padded-bitfield">;
def Padded : DiagGroup<"padded", [PaddedBitField]>;
def UnalignedAccess : DiagGroup<"unaligned-access">;
+def MSBitfieldCompatibility : DiagGroup<"ms-bitfield-packing-compatibility">;
----------------
ojhunt wrote:
I've removed -packing- because I could see us extending this to also warn in cases where the ms "signed by default" nonsense could cause issues - e.g. rather than a new flag for every possible scenario we can just have one.
https://github.com/llvm/llvm-project/pull/117428
More information about the cfe-commits
mailing list