File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -51,6 +51,7 @@ class CPPCHECKLIB CheckCondition : public Check {
5151 checkCondition.oppositeInnerCondition ();
5252 checkCondition.checkIncorrectLogicOperator ();
5353 checkCondition.checkInvalidTestForOverflow ();
54+ checkCondition.alwaysTrueFalse ();
5455 }
5556
5657 /* * @brief Run checks against the simplified token list */
@@ -60,7 +61,6 @@ class CPPCHECKLIB CheckCondition : public Check {
6061 checkCondition.checkBadBitmaskCheck ();
6162 checkCondition.comparison ();
6263 checkCondition.checkModuloAlwaysTrueFalse ();
63- checkCondition.alwaysTrueFalse ();
6464 }
6565
6666 /* * mismatching assignment / comparison */
Original file line number Diff line number Diff line change @@ -1596,7 +1596,9 @@ class TestCondition : public TestFixture {
15961596 " A(x++ == 1);\n "
15971597 " A(x++ == 2);\n "
15981598 " }" );
1599- ASSERT_EQUALS (" [test.cpp:4]: (style) Condition 'x++==2' is always false\n " , errout.str ());
1599+ ASSERT_EQUALS (" [test.cpp:3]: (style) Condition 'x++==1' is always false\n "
1600+ " [test.cpp:4]: (style) Condition 'x++==2' is always false\n " ,
1601+ errout.str ());
16001602
16011603 // Avoid FP when condition comes from macro
16021604 check (" void f() {\n "
You can’t perform that action at this time.
0 commit comments