[PATCH] D118511: Add a warning for not packing non-POD members in packed structs

David Blaikie via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Feb 2 15:25:55 PST 2022


dblaikie updated this revision to Diff 405468.
dblaikie added a comment.

- Create a separate sub-warning flag of -Wpacked (-Wpacked-non-pod), in case you're just interested in the ABI breaks here
- Warn only when this produces a different alignment requirement for the field


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D118511/new/

https://reviews.llvm.org/D118511

Files:
  clang/include/clang/Basic/DiagnosticASTKinds.td
  clang/include/clang/Basic/DiagnosticGroups.td
  clang/lib/AST/RecordLayoutBuilder.cpp
  clang/test/CodeGenCXX/warn-padded-packed.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D118511.405468.patch
Type: text/x-patch
Size: 4558 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20220202/2de1dceb/attachment-0001.bin>


More information about the cfe-commits mailing list