Fix the last test case from ticket #613 (array members variables are not checked in constructor)
http://sourceforge.net/apps/trac/cppcheck/ticket/613
This commit is contained in:
parent
ff9ed1d7aa
commit
929dbe92e4
|
@ -221,6 +221,10 @@ void CheckClass::initializeVarList(const Token *tok1, const Token *ftok, Var *va
|
||||||
if (Token::simpleMatch(ftok, "this ."))
|
if (Token::simpleMatch(ftok, "this ."))
|
||||||
ftok = ftok->tokAt(2);
|
ftok = ftok->tokAt(2);
|
||||||
|
|
||||||
|
// Skip "classname :: "
|
||||||
|
if (Token::Match(ftok, "%var% ::"))
|
||||||
|
ftok = ftok->tokAt(2);
|
||||||
|
|
||||||
// Clearing all variables..
|
// Clearing all variables..
|
||||||
if (Token::simpleMatch(ftok, "memset ( this ,"))
|
if (Token::simpleMatch(ftok, "memset ( this ,"))
|
||||||
{
|
{
|
||||||
|
|
|
@ -414,7 +414,7 @@ private:
|
||||||
" char name[255];\n"
|
" char name[255];\n"
|
||||||
"};\n");
|
"};\n");
|
||||||
|
|
||||||
TODO_ASSERT_EQUALS("", errout.str());
|
ASSERT_EQUALS("", errout.str());
|
||||||
|
|
||||||
checkUninitVar("class John\n"
|
checkUninitVar("class John\n"
|
||||||
"{\n"
|
"{\n"
|
||||||
|
|
Loading…
Reference in New Issue