================
@@ -317,17 +320,67 @@ class TransferVisitor : public
ConstStmtVisitor<TransferVisitor> {
break;
}
+ case CK_BaseToDerived: {
+ // This is a cast of (single-layer) pointer or reference to a record
type.
+ // We should now model the fields for the derived type.
+
+ // Get the RecordStorageLocation for the record object underneath.
+ RecordStorageLocation *Loc = nullptr;
+ if (S->getType()->isPointerType()) {
+ assert(S->getType()->isPointerType());
+ auto *PV = Env.get<PointerValue>(*SubExpr);
+ Loc = cast<RecordStorageLocation>(&PV->getPointeeLoc());
----------------
bazuzi wrote:
Done.
https://github.com/llvm/llvm-project/pull/153066
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits