calculation in sizeof: added two more ASSERT_EQUALS to guard against false positives
This commit is contained in:
parent
c395e51389
commit
e7e86ef333
|
@ -2789,6 +2789,12 @@ private:
|
|||
{
|
||||
check("sizeof(a+b)");
|
||||
ASSERT_EQUALS("[test.cpp:1]: (style) Found calculation inside sizeof()\n", errout.str());
|
||||
|
||||
check("sizeof(-a)");
|
||||
ASSERT_EQUALS("", errout.str());
|
||||
|
||||
check("sizeof(void * const)");
|
||||
ASSERT_EQUALS("", errout.str());
|
||||
}
|
||||
|
||||
void emptyCatchBlock()
|
||||
|
|
Loading…
Reference in New Issue