[clang] [clang][dataflow] Process terminator condition within `transferCFGBlock()`. (PR #78127)

via cfe-commits cfe-commits at lists.llvm.org
Tue Jan 16 01:47:56 PST 2024


martinboehme wrote:

Heads up: I'm holding off on merging this PR for the time being because I've discovered that it breaks some of our internal integration tests. The reason is a pre-existing bug, for which I have a fix in review at #78245.

The effect of the bug is that the following code in this PR does not guarantee that `State.Env.getValue(*TerminatorCond)` will return a non-null value after the code is run:

```cxx
    if (State.Env.getValue(*TerminatorCond) == nullptr)
      State.Env.setValue(*TerminatorCond, State.Env.makeAtomicBoolValue());
```

As a result, the assertion `assert(Val != nullptr);` in `extendFlowCondition()` fails.

https://github.com/llvm/llvm-project/pull/78127


More information about the cfe-commits mailing list