bazuzi wrote: > And the other copyRecord further down "copyRecord(*LocDst, > Env.getResultObjectLocation(*S), Env)" is safe because there is a stricter > check "DstDecl->isDerivedFrom(ReturnDecl)"?
Yes, the types there are already more restricted than the CompatibleTypes check inside of copyRecord. There may be some complex inheritance patterns that are compatible but not modeled because that check is more strict than necessary, but it is sufficient to make the copyRecord call safe, as far as I can tell. Unrelated, I noticed a mistake in the comment before the copyRecord call I modified. I'll correct "destination object may be of a sibling derived class" to "source object may be of a sibling derived class" before merging. https://github.com/llvm/llvm-project/pull/160557 _______________________________________________ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
