Skip to content

Commit a32cd61

Browse files
committed
add todo
1 parent 060a665 commit a32cd61

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
@@ -10109,6 +10109,15 @@ class TestOther : public TestFixture {
1010910109
ASSERT_EQUALS("[test.cpp:2:11]: (style) Variable 'p' can be declared as pointer to const [constVariablePointer]\n"
1011010110
"[test.cpp:4:5]: (error) Mismatching address is deleted. The address you get from new must be deleted without offset. [invalidFree]\n",
1011110111
errout_str());
10112+
10113+
check("void f() {\n"
10114+
" char *p = malloc(1);\n"
10115+
" ++p;\n"
10116+
" free(p - 1);\n"
10117+
"}\n");
10118+
TODO_ASSERT_EQUALS("",
10119+
"[test.cpp:4:5]: (error) Mismatching address is freed. The address you get from malloc() must be freed without offset. [invalidFree]\n",
10120+
errout_str());
1011210121
}
1011310122

1011410123
void checkRedundantCopy() {

0 commit comments

Comments
 (0)