We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2a47ac2 commit e71dc89Copy full SHA for e71dc89
1 file changed
lib/forwardanalyzer.cpp
@@ -787,7 +787,11 @@ namespace {
787
return Break();
788
} else {
789
const bool conditional = stopOnCondition(condTok);
790
- ForwardTraversal ft = fork();
+ // The value only flows into the then-branch when the condition can split
791
+ // it. For an opaque or correlated condition (e.g. 'if (f(x))' or
792
+ // 'if (do_write)') it does not really reach there, so fork in analyze-only
793
+ // mode: the branch's effect is still tracked but nothing is reported in it.
794
+ ForwardTraversal ft = fork(!analyzer->updateScope(thenBranch.endBlock, false));
795
ft.analyzer->assume(condTok, true);
796
Progress pThen = ft.updateBranch(thenBranch, depth - 1);
797
0 commit comments