@@ -743,12 +743,12 @@ struct ValueFlowAnalyzer : Analyzer {
743743 endBlock = startBlock->link ();
744744 }
745745
746- // NoState is set only for the pre-traversal assume; without it the 'then' block has already
746+ // Pending is set only for the pre-traversal assume; without it the 'then' block has already
747747 // been traversed and control is leaving it, so anchor the assumed state at the end of the
748748 // block rather than at the condition. Assumptions about variables modified inside the block
749749 // (e.g. an 'if' that narrows a value computed in the block) then survive past it, instead of
750750 // being discarded because the variable was "modified" since the condition was evaluated.
751- const bool scopeEnd = !(flags & Assume::NoState ) && state && endBlock;
751+ const bool scopeEnd = !(flags & Assume::Pending ) && state && endBlock;
752752 const Token* anchor = scopeEnd ? endBlock : tok;
753753 const Token* origin = scopeEnd ? endBlock : nullptr ;
754754
@@ -760,7 +760,7 @@ struct ValueFlowAnalyzer : Analyzer {
760760 // On the false path the block was already traversed (the true path is handled by scopeEnd
761761 // above), so record the assumed state where control continues: past the else block, or past
762762 // the closing brace when there is no else, so it is available to the enclosing scope.
763- if (isCondBlock && !(flags & Assume::NoState ) && !state) {
763+ if (isCondBlock && !(flags & Assume::Pending ) && !state) {
764764 if (Token::simpleMatch (endBlock, " } else {" ))
765765 pms.addState (endBlock->linkAt (2 )->previous (), getProgramState ());
766766 else
0 commit comments