]> granicus.if.org Git - clang/commit
[Sema] Fix incorrect packed aligned structure layout
authorMomchil Velikov <momchil.velikov@arm.com>
Mon, 21 May 2018 14:28:43 +0000 (14:28 +0000)
committerMomchil Velikov <momchil.velikov@arm.com>
Mon, 21 May 2018 14:28:43 +0000 (14:28 +0000)
commitdc6b868ff22d0bf6d426d177578a8afd9231bdea
tree68d4e3a81634e05e993fd6dec62bed5c31fbb9ed
parent9f2f8904e02e234625098e8e787fbac5b5ad9431
[Sema] Fix incorrect packed aligned structure layout

Handle attributes before checking the record layout (e.g. underalignment check
during `alignas` processing), as layout may be cached without taking into
account attributes that may affect it.

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@332843 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Sema/SemaDecl.cpp
test/Layout/itanium-pack-and-align.cpp [new file with mode: 0644]