The current implementation mutates the environment as it performs the
join. However, that interferes with the call to the model's merge operation,
which can modify MergedEnv. Since any modifications are assumed to apply to
the post-join environment, providing the same environment for both is
incorrect. This mismatch is a particular concern for joining the flow
conditions, where modifications in the old environment may not be propagated to
the new one.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
clang/lib/Analysis/FlowSensitive/DataflowEnvironment.cpp | ||
---|---|---|
339–341 | This comment is no longer relevant, right? | |
clang/unittests/Analysis/FlowSensitive/TypeErasedDataflowAnalysisTest.cpp | ||
299 | ||
340–344 | ||
356 | That's guaranteed to be false in compareEquivalent. | |
364–368 | ||
414 | ||
422 | Add /*[[p3]]*/ after this statement and ensure that the value is implied in the "else" branch. |
clang/unittests/Analysis/FlowSensitive/TypeErasedDataflowAnalysisTest.cpp | ||
---|---|---|
356 | I thought just Val1 == Val2 was guaranteed false? Also, I see that the variable naming could be confusing, so I've renamed. |
clang/unittests/Analysis/FlowSensitive/TypeErasedDataflowAnalysisTest.cpp | ||
---|---|---|
356 | Right. I think I misread it. Having IsSet1 == IsSet2 here makes sense to me. Though, if the test only needs the second part, I suggest removing this to simplify the setup. |
clang/unittests/Analysis/FlowSensitive/TypeErasedDataflowAnalysisTest.cpp | ||
---|---|---|
356 | agreed. done |
Typo: Val2.