[PATCH] D158848: [clang][dataflow] Support range-for loops in fixpoint algorithm.

Yitzhak Mandelbaum via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Aug 28 07:45:25 PDT 2023


ymandel added inline comments.


================
Comment at: clang/unittests/Analysis/FlowSensitive/TypeErasedDataflowAnalysisTest.cpp:1631
+         const AnalysisOutputs &) {
+        EXPECT_THAT(Results.keys(), UnorderedElementsAre("after_loop"));
+      });
----------------
mboehme wrote:
> Is this check (and the `(void)0` with the `[[after_loop]` annotation) actually needed?
> 
> IIUC, the condition we want to test is that the analysis converges. The fact that it produces a `Results` entry for `[[after_loop]]` is really more a check of the testing infrastructure rather than the analysis itself?
Correct. I thought it would be useful to include some expectations, but those are really quite independent, so I've removed them.  We could go further and call `runAnalysis` instead of `runDataflow`, but I prefer the latter for consistency (in terms of build args and the like) with the other tests in this suite.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D158848



More information about the cfe-commits mailing list