=?utf-8?q?Donát?= Nagy <donat.n...@ericsson.com> Message-ID: In-Reply-To: <llvm.org/llvm/llvm-project/pull/139...@github.com>
================ @@ -479,25 +479,20 @@ ExplodedGraph::trim(ArrayRef<const NodeTy *> Sinks, // in the trimmed graph, then add the corresponding edges with // `addPredecessor()`, otherwise add them to the worklist. for (const ExplodedNode *Pred : N->Preds) { - auto Iterator = ForwardMap->find(Pred); - if (Iterator != ForwardMap->end()) { - NewN->addPredecessor(const_cast<ExplodedNode *>(Iterator->second), *Trimmed); - } else { + if (const ExplodedNode *Mapped = ForwardMap->lookup(Pred)) + NewN->addPredecessor(const_cast<ExplodedNode *>(Mapped), *Trimmed); ---------------- steakhal wrote: Given these const_cast, I wonder if we could just put mutable pointers to the `ForwardMap` so that we wouldn't need to cast it away from these places. WDYT? but its really bikeshedding at this point. I'm happy as we have this already. https://github.com/llvm/llvm-project/pull/139939 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits