diff --git a/lib/checkother.h b/lib/checkother.h index 75dfc5f25..c627c85c0 100644 --- a/lib/checkother.h +++ b/lib/checkother.h @@ -88,6 +88,7 @@ public: checkOther.checkPipeParameterSize(); checkOther.checkRedundantCopy(); checkOther.clarifyCalculation(); + checkOther.checkPassByReference(); } /** @brief Run checks against the simplified token list */ @@ -96,7 +97,6 @@ public: // Checks checkOther.clarifyStatement(); - checkOther.checkPassByReference(); checkOther.checkCastIntToCharAndBack(); checkOther.checkMisusedScopedObject(); diff --git a/test/testother.cpp b/test/testother.cpp index 62b4a5291..cea5fe89e 100644 --- a/test/testother.cpp +++ b/test/testother.cpp @@ -3335,7 +3335,7 @@ private: check("void f(char c) {\n" " printf(\"%i\", 1 + 1 ? 1 : 2);\n" // "1+1" is simplified away "}",0,false,false,false); - TODO_ASSERT_EQUALS("[test.cpp:2]: (style) Clarify calculation precedence for '+' and '?'.\n", "", errout.str()); // TODO: Is that really necessary, or is this pattern too unlikely? + ASSERT_EQUALS("[test.cpp:2]: (style) Clarify calculation precedence for '+' and '?'.\n", errout.str()); check("void f() {\n" " std::cout << x << 1 ? 2 : 3;\n"