]> granicus.if.org Git - clang/commit
PR37275 packed attribute should not apply to base classes
authorRichard Smith <richard-llvm@metafoo.co.uk>
Sun, 29 Apr 2018 04:55:46 +0000 (04:55 +0000)
committerRichard Smith <richard-llvm@metafoo.co.uk>
Sun, 29 Apr 2018 04:55:46 +0000 (04:55 +0000)
commit3d0b7546132a9a667122e457b3baec4cd03947e0
tree26fdd9041deb9ccd4c2fbc8faadfa3e424b510ea
parentfc26ba15dd3d6c4e30e868b08110d9d87a21107a
PR37275 packed attribute should not apply to base classes

Clang incorrectly applied 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.

Differential Revision: https://reviews.llvm.org/D46218

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@331136 91177308-0d34-0410-b5e6-96231b3b80d8
docs/ReleaseNotes.rst
lib/AST/RecordLayoutBuilder.cpp
test/CodeGenCXX/alignment.cpp
test/SemaCXX/class-layout.cpp