ymandel accepted this revision.
ymandel added a comment.
This revision is now accepted and ready to land.

Nice!



================
Comment at: clang/lib/Analysis/FlowSensitive/TypeErasedDataflowAnalysis.cpp:180
+      assert(Block->pred_size() == 2);
+      BackEdge = Pred;
+    }
----------------
Might it be worth simply returning the backedge when you find it? Or is the 
assertion (above) sufficiently important to keep it as is?


================
Comment at: 
clang/unittests/Analysis/FlowSensitive/TypeErasedDataflowAnalysisTest.cpp:275
+  )";
+  auto BlockStates = llvm::cantFail(runAnalysis<ConvergesOnWidenAnalysis>(
+      Code, [](ASTContext &C) { return ConvergesOnWidenAnalysis(C); }));
----------------
Might a (googletest) assertion here be better than `llvm::cantFail`? I would 
think that this line is the crux of checking whether it converges or not.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D131646/new/

https://reviews.llvm.org/D131646

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to