================
@@ -328,9 +328,9 @@ class TransferVisitor : public 
ConstStmtVisitor<TransferVisitor> {
       RecordStorageLocation *Loc = nullptr;
       if (S->getType()->isPointerType()) {
         auto *PV = Env.get<PointerValue>(*SubExpr);
-        assert(PV != nullptr);
         if (PV == nullptr)
-          break;
+          PV = cast<PointerValue>(Env.createValue(S->getType()));
----------------
ymand wrote:

`createValue` can return nullptr. It's possible that for PointerValue type it 
always returns nonnull, but I think that's risky to depend on. So, you need to 
account for that case.

Moreover, this requires a comment explaining the new behavior.

https://github.com/llvm/llvm-project/pull/179060
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to