Skip to content

Commit 7f23298

Browse files
committed
add todo
1 parent 7ae750b commit 7f23298

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

‎test/testother.cpp‎

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10096,6 +10096,15 @@ class TestOther : public TestFixture {
1009610096
ASSERT_EQUALS("[test.cpp:2:11]: (style) Variable 'p' can be declared as pointer to const [constVariablePointer]\n"
1009710097
"[test.cpp:4:5]: (error) Mismatching address is deleted. The address you get from new must be deleted without offset. [invalidFree]\n",
1009810098
errout_str());
10099+
10100+
check("void f() {\n"
10101+
" char *p = malloc(1);\n"
10102+
" ++p;\n"
10103+
" free(p - 1);\n"
10104+
"}\n");
10105+
TODO_ASSERT_EQUALS("",
10106+
"[test.cpp:4:5]: (error) Mismatching address is freed. The address you get from malloc() must be freed without offset. [invalidFree]\n",
10107+
errout_str());
1009910108
}
1010010109

1010110110
void checkRedundantCopy() {

0 commit comments

Comments
 (0)