@@ -412,23 +412,8 @@ namespace {
412412 return bail;
413413 }
414414
415- Progress updateBranch (Branch& branch, int depth, bool flow )
415+ Progress updateBranch (Branch& branch, int depth)
416416 {
417- // Determine the branch's effect on the value without reporting (read-only)
418- branch.action |= analyzeScope (branch.endBlock );
419- // Mirror checkBranch()/tryForkUpdateScope(): only flow the value into the branch when
420- // the analyzer allows it. A conditional value (e.g. a possible null carried under an
421- // unrelated condition) must not be propagated into the branch, otherwise it produces
422- // false positives. 'flow' is evaluated on the unassumed value by the caller.
423- if (!flow) {
424- bool unknown = false ;
425- if (isEscapeScope (branch.endBlock , unknown)) {
426- branch.escape = true ;
427- branch.escapeUnknown = unknown;
428- }
429- return Progress::Continue;
430- }
431-
432417 // Save and reset actions
433418 Analyzer::Action prevActions = actions;
434419 actions = Analyzer::Action::None;
@@ -796,18 +781,13 @@ namespace {
796781 return Break ();
797782 } else {
798783 const bool conditional = stopOnCondition (condTok);
799- // Decide whether the value may flow into each branch using the unassumed
800- // value (as checkBranch() does), before assume() makes the forks conditional
801- const bool flowThen = analyzer->updateScope (thenBranch.endBlock , analyzeScope (thenBranch.endBlock ).isModified ());
802- const bool flowElse = hasElse && elseBranch.endBlock &&
803- analyzer->updateScope (elseBranch.endBlock , analyzeScope (elseBranch.endBlock ).isModified ());
804784 ForwardTraversal ft = fork ();
805785 ft.analyzer ->assume (condTok, true );
806- Progress p = ft.updateBranch (thenBranch, depth - 1 , flowThen );
786+ Progress p = ft.updateBranch (thenBranch, depth - 1 );
807787
808788 analyzer->assume (condTok, false );
809789 if (hasElse) {
810- if (updateBranch (elseBranch, depth - 1 , flowElse ) == Progress::Break)
790+ if (updateBranch (elseBranch, depth - 1 ) == Progress::Break)
811791 return Break ();
812792 }
813793 if (thenBranch.isDead () || elseBranch.isDead ()) {
0 commit comments