================ @@ -54,6 +54,18 @@ void clang::dataflow::copyRecord(RecordStorageLocation &Src, } } + for (const auto &[Name, PropLocSrc] : Src.synthetic_fields()) { + if (PropLocSrc->getType()->isRecordType()) { + copyRecord(*cast<RecordStorageLocation>(PropLocSrc), + cast<RecordStorageLocation>(Dst.getSyntheticField(Name)), Env); + } else { + if (Value *Val = Env.getValue(*PropLocSrc)) ---------------- martinboehme wrote:
`else if` would reduce indentation, but it would also lose the grouping that we currently have: The outer `else` block handles the case where the synthetic field isn't a record type. Having this indented within its own block makes it clearer which parts of the code handle which case -- so unless you feel strongly, I'd like to keep this as is. https://github.com/llvm/llvm-project/pull/73860 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits