Skip to content

Commit f20469b

Browse files
committed
add test
1 parent 7d48e00 commit f20469b

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

test/testvalueflow.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7932,6 +7932,13 @@ class TestValueFlow : public TestFixture {
79327932
" return x;\n"
79337933
"}";
79347934
ASSERT_EQUALS(true, testValueOfX(code, 4U, 4, ValueFlow::Value::ValueType::BUFFER_SIZE, &settingsCfg));
7935+
7936+
code = "void f()\n"
7937+
"{\n"
7938+
" void *x = ::operator new(0);\n"
7939+
" (void) x;\n"
7940+
"}\n";
7941+
ASSERT_EQUALS(true, testValueOfX(code, 4U, 0, ValueFlow::Value::ValueType::BUFFER_SIZE));
79357942
}
79367943

79377944
void valueFlowSafeFunctionParameterValues() {

0 commit comments

Comments
 (0)