[PATCH] D46218: PR37275 packed attribute should not apply to base classes
Richard Smith - zygoloid via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Apr 27 15:55:33 PDT 2018
rsmith created this revision.
rsmith added a reviewer: rjmccall.
Clang incorrectly applies the packed attribute to base classes. Per GCC's documentation and as can be observed from its behavior, packed only applies to members, not base classes.
This change is conditioned behind `-fclang-abi-compat` so that an ABI break can be avoided by users if desired.
Repository:
rC Clang
https://reviews.llvm.org/D46218
Files:
lib/AST/RecordLayoutBuilder.cpp
test/CodeGenCXX/alignment.cpp
test/SemaCXX/class-layout.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D46218.144414.patch
Type: text/x-patch
Size: 7954 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20180427/39820359/attachment.bin>
More information about the cfe-commits
mailing list