diff --git a/lib/checkclass.cpp b/lib/checkclass.cpp index 891714cc8..ffecf5748 100644 --- a/lib/checkclass.cpp +++ b/lib/checkclass.cpp @@ -528,7 +528,7 @@ void CheckClass::initializeVarList(const Function &func, std::listnext(), "::| %var%") && - !Token::Match(ftok->next(), "this . %var%") && + !Token::Match(ftok->next(), "*| this . %var%") && !Token::Match(ftok->next(), "* %var% =") && !Token::Match(ftok->next(), "( * this ) . %var%")) continue; @@ -700,6 +700,8 @@ void CheckClass::initializeVarList(const Function &func, std::listname = '\\0';}\n" + "\n" + "private:\n" + " char name[255];\n" + "};"); + ASSERT_EQUALS("", errout.str()); } void uninitVarArray3() {