Skip to content

Commit 1eb3825

Browse files
Update testvalueflow.cpp
1 parent f4a5eb9 commit 1eb3825

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

test/testvalueflow.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3112,6 +3112,12 @@ class TestValueFlow : public TestFixture {
31123112
" return x;\n"
31133113
"}\n";
31143114
ASSERT_EQUALS(false, testValueOfXKnown(code, 9U, 1));
3115+
3116+
code = "int32_t f() {\n"
3117+
" const int32_t x = 0xffffffff;\n"
3118+
" return x;\n"
3119+
"}\n";
3120+
ASSERT_EQUALS(true, testValueOfXKnown(code, 3U, -1));
31153121
}
31163122

31173123
void valueFlowAfterSwap()

0 commit comments

Comments
 (0)