Check nullpointer check is now executed without --style flag
Added TODO test case for nullpointer check
This commit is contained in:
parent
64f0f3b308
commit
63523316a2
|
@ -47,12 +47,12 @@ public:
|
|||
{
|
||||
CheckOther checkOther(tokenizer, settings, errorLogger);
|
||||
|
||||
checkOther.nullPointer();
|
||||
if (settings->_checkCodingStyle)
|
||||
{
|
||||
checkOther.warningOldStylePointerCast();
|
||||
checkOther.checkUnsignedDivision();
|
||||
checkOther.checkCharVariable();
|
||||
checkOther.nullPointer();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -774,6 +774,15 @@ private:
|
|||
"}\n");
|
||||
ASSERT_EQUALS("", errout.str());
|
||||
|
||||
checkNullPointer("void foo(P *p)\n"
|
||||
"{\n"
|
||||
" while (p)\n"
|
||||
" if (p->check())\n"
|
||||
" break;\n"
|
||||
" else\n"
|
||||
" p = p->next();\n"
|
||||
"}\n");
|
||||
TODO_ASSERT_EQUALS("", errout.str());
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue