Permalink
Browse files

Added missing checks to CheckClass::classInfo()

Replaced tokAt(1) with next() in checkother.cpp
  • Loading branch information...
1 parent 0886d31 commit be7b104a8e3e6a67f3f7e891aff1e7bc932da216 @PKEuS PKEuS committed May 19, 2012
Showing with 7 additions and 3 deletions.
  1. +6 −2 lib/checkclass.h
  2. +1 −1 lib/checkother.cpp
View
@@ -152,12 +152,16 @@ class CheckClass : public Check {
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
@@ -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)

0 comments on commit be7b104

Please sign in to comment.