[PATCH] D149640: [clang][dataflow] Change PruneTriviallyFalseEdges for building CFG

Martin Böhme via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue May 2 06:41:04 PDT 2023


mboehme added inline comments.


================
Comment at: clang/unittests/Analysis/FlowSensitive/TransferTest.cpp:2673
-
-        EXPECT_EQ(BarVal, FooPointeeVal);
       });
----------------
It's unfortuante that all of these checks have gone away. I think the test was actually trying to test something.

I'd suggest checking the environment at two different places:

```
    void target(int *Foo) {
      do {
        int Bar = *Foo;
        // [[in_loop]]
      } while (true);
      (void)0;
      // [[after_loop]]
    }
```

You can keep the existing checks for the `in_loop` environment and verify that `Results` doesn't actually contain an environment for `after_loop`.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D149640



More information about the cfe-commits mailing list