[clang] [Clang] Handle structs with inner structs and no fields (PR #89126)
Eli Friedman via cfe-commits
cfe-commits at lists.llvm.org
Wed Apr 17 18:16:56 PDT 2024
================
@@ -844,7 +847,18 @@ const FieldDecl *CodeGenFunction::FindFlexibleArrayMemberField(
if (const FieldDecl *Field =
----------------
efriedma-quic wrote:
FieldNo and Layout are referring to fields of "RD"; the "Field" found in the recursive visit is a member of Record (or some subobject of Record). So the code is doing math on completely unrelated offsets. Checking getFieldCount is just masking the issue.
https://github.com/llvm/llvm-project/pull/89126
More information about the cfe-commits
mailing list