[PATCH] D139741: [clang][CodeGen] Use base subobject type layout for potentially-overlapping fields
Vladislav Dzhidzhoev via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Jan 24 08:01:53 PST 2023
dzhidzhoev updated this revision to Diff 491807.
dzhidzhoev added a comment.
Fixed crash for 'struct C' in no-unique-address-3.cpp.
Without the fix, packedness for regular union layout in provided test
and for [[no_unique_address]] union layout turns out to be different.
This causes assertion on CGRecordLayoutBuilder.cpp:902.
Fix is similar to what is done on CGRecordLayoutBuilder.cpp:790,794.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D139741/new/
https://reviews.llvm.org/D139741
Files:
clang/include/clang/AST/Decl.h
clang/lib/AST/Decl.cpp
clang/lib/AST/RecordLayoutBuilder.cpp
clang/lib/CodeGen/CGRecordLayoutBuilder.cpp
clang/test/CodeGenCXX/no-unique-address-3.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D139741.491807.patch
Type: text/x-patch
Size: 12958 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20230124/3322c2e8/attachment-0001.bin>
More information about the cfe-commits
mailing list