[PATCH] D34114: [clang] Change the condition of unnecessary packed warning
Yan Wang via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Jul 26 16:27:21 PDT 2017
yawanng added inline comments.
================
Comment at: lib/AST/RecordLayoutBuilder.cpp:1888
- if (Packed && UnpackedAlignment > CharUnits::One() &&
- getSize() == UnpackedSize)
Diag(D->getLocation(), diag::warn_unnecessary_packed)
----------------
chh wrote:
> Why not keeping the (getSize() == UnpackedSize) condition?
>
It seems to me that when the alignment is 1 byte, the size won't change.
https://reviews.llvm.org/D34114
More information about the cfe-commits
mailing list