Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Added missing checks to CheckClass::classInfo()

Replaced tokAt(1) with next() in checkother.cpp
  • Loading branch information...
commit be7b104a8e3e6a67f3f7e891aff1e7bc932da216 1 parent 0886d31
PKEuS authored May 19, 2012
8  lib/checkclass.h
@@ -152,12 +152,16 @@ class CheckClass : public Check {
152 152
         return "Check the code for each class.\n"
153 153
                "* Missing constructors\n"
154 154
                "* Are all variables initialized by the constructors?\n"
  155
+               "* Are all variables assigned by 'operator='?\n"
155 156
                "* Warn if memset, memcpy etc are used on a class\n"
156 157
                "* If it's a base class, check that the destructor is virtual\n"
157  
-               "* Are there unused private functions\n"
  158
+               "* Are there unused private functions?\n"
158 159
                "* 'operator=' should return reference to self\n"
159 160
                "* 'operator=' should check for assignment to self\n"
160  
-               "* Constness for member functions\n";
  161
+               "* Constness for member functions\n"
  162
+               "* Order of initalizations\n"
  163
+               "* Suggest usage of initalization list\n"
  164
+               "* Suspicious subtraction from 'this'\n";
161 165
     }
162 166
 
163 167
     // operatorEqRetRefThis helper function
2  lib/checkother.cpp
@@ -1750,7 +1750,7 @@ void CheckOther::checkUnreachableCode()
1750 1750
                 }
1751 1751
         } else if (Token::Match(tok, "goto %any% ;")) {
1752 1752
             secondBreak = tok->tokAt(3);
1753  
-            labelName = tok->tokAt(1);
  1753
+            labelName = tok->next();
1754 1754
         }
1755 1755
 
1756 1756
         // Statements follow directly, no line between them. (#3383)

0 notes on commit be7b104

Please sign in to comment.
Something went wrong with that request. Please try again.