[PATCH] D122248: [clang][CodeGen]Fix clang crash and add bitfield support in __builtin_dump_struct

Wang Yihan via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Mar 22 11:51:03 PDT 2022


yihanaa created this revision.
yihanaa added reviewers: MaskRay, gchatelet, sepavloff.
yihanaa added a project: LLVM.
Herald added a subscriber: StephenFan.
Herald added a project: All.
yihanaa requested review of this revision.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.

Fix clang crash and add bitfield support in __builtin_dump_struct.
In clang13.0.x, a struct with three or more members and a bitfield at the same time will cause a crash. In clang15.x, as long as the struct has one bitfield, it will cause a crash in clang.

Open issue: https://github.com/llvm/llvm-project/issues/54462


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D122248

Files:
  clang/lib/CodeGen/CGBuiltin.cpp
  clang/test/CodeGen/dump-struct-builtin.c

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D122248.417353.patch
Type: text/x-patch
Size: 368567 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20220322/b6458c49/attachment-0001.bin>


More information about the cfe-commits mailing list