================
@@ -46,8 +46,9 @@ void AnalyzerStatsChecker::checkEndAnalysis(ExplodedGraph &G,
   llvm::SmallPtrSet<const CFGBlock*, 32> reachable;
 
   // Root node should have the location context of the top most function.
-  const ExplodedNode *GraphRoot = *G.roots_begin();
-  const LocationContext *LC = GraphRoot->getLocation().getLocationContext();
+  // FIXME: Use `Eng.getRootLocationContext()` unless `G` can be different from
+  // the `ExplodedGraph` owned by Eng.
+  const LocationContext *LC = G.getRoot()->getLocation().getLocationContext();
----------------
NagyDonat wrote:

Yes, I verified that the graph is owned by `Eng` and replaced this complex call 
with `Eng.GetRootLocationContext()`. (By the way, why does this callback 
receive the exploded graph as a separate argument if it is already accessible 
via `Eng.getGraph()`?? Yet another thing to clean up...)

https://github.com/llvm/llvm-project/pull/139903
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to