chh added a comment. These warnings are triggered by -Wpadded -Wpacked or clang-tidy's clang-diagnostic-packed check. I agree that they should be ignored or suppressed in many cases. What I am not sure is the amount of real positive cases.
I found it too tedious to suppress one warning per struct field, and hence liked this CL to consolidate those per-field warnings into one per struct type. With this change we can use one NOLINT to suppress all such warnings of a struct type, in the header file. One alternative for users is to ignore these checks or warnings for the whole compilation unit. That has the risk of masking out valid warnings to other packed struct types in the same compilation unit. Since the types are defined in header files, these warnings would need to be suppressed in all compilation units that include those header files. I am not against removing these warnings completely. If not removed, I hope that we can consolidate multiple per-field warnings to one at the struct type level. Repository: rL LLVM https://reviews.llvm.org/D34114 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits