Fixed #9731 (ValueFlow: does not handle many assignments well)
This commit is contained in:
parent
7e361536de
commit
6d796b434e
|
@ -114,6 +114,9 @@ struct ForwardTraversal {
|
|||
return Progress::Break;
|
||||
if (action.isInvalid())
|
||||
return Progress::Break;
|
||||
if (action.isWrite() && !action.isRead())
|
||||
// Analysis of this write will continue separately
|
||||
return Progress::Break;
|
||||
return Progress::Continue;
|
||||
}
|
||||
|
||||
|
|
|
@ -1819,7 +1819,7 @@ private:
|
|||
" y = 42 / x;\n" // <- x is 2
|
||||
"}";
|
||||
ASSERT_EQUALS(false, testValueOfX(code, 5U, 0));
|
||||
ASSERT_EQUALS(true, testValueOfX(code, 5U, 2));
|
||||
TODO_ASSERT_EQUALS(true, false, testValueOfX(code, 5U, 2));
|
||||
|
||||
code = "void f() {\n" // #6118 - FN
|
||||
" int x = 0;\n"
|
||||
|
|
Loading…
Reference in New Issue