[PATCH] D128060: [clang][dataflow] Extend flow condition in the body of a for loop

Stanislav Gatev via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sun Jun 19 23:10:02 PDT 2022


sgatev marked an inline comment as done.
sgatev added inline comments.


================
Comment at: clang/lib/Analysis/FlowSensitive/TypeErasedDataflowAnalysis.cpp:92
 
+  void VisitForStmt(const ForStmt *S) {
+    auto *Cond = S->getCond();
----------------
xazax.hun wrote:
> Do we support `DoStmt` or is that missing?
Good question. I think it's worth adding support for `DoStmt`, but that won't be very useful at this point because the condition will not always be true within the body of the loop. I'd be happy to follow up with a patch for it, but I'll first need to figure out what test to write. Ideas are welcome. : )


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D128060



More information about the cfe-commits mailing list