Added missing checks to CheckClass::classInfo()

Replaced tokAt(1) with next() in checkother.cpp
This commit is contained in:
PKEuS 2012-05-19 01:51:47 -07:00
parent 0886d31e9c
commit be7b104a8e
2 changed files with 7 additions and 3 deletions

View File

@ -152,12 +152,16 @@ private:
return "Check the code for each class.\n"
"* Missing constructors\n"
"* Are all variables initialized by the constructors?\n"
"* Are all variables assigned by 'operator='?\n"
"* Warn if memset, memcpy etc are used on a class\n"
"* If it's a base class, check that the destructor is virtual\n"
"* Are there unused private functions\n"
"* Are there unused private functions?\n"
"* 'operator=' should return reference to self\n"
"* 'operator=' should check for assignment to self\n"
"* Constness for member functions\n";
"* Constness for member functions\n"
"* Order of initalizations\n"
"* Suggest usage of initalization list\n"
"* Suspicious subtraction from 'this'\n";
}
// operatorEqRetRefThis helper function

View File

@ -1750,7 +1750,7 @@ void CheckOther::checkUnreachableCode()
}
} else if (Token::Match(tok, "goto %any% ;")) {
secondBreak = tok->tokAt(3);
labelName = tok->tokAt(1);
labelName = tok->next();
}
// Statements follow directly, no line between them. (#3383)