Moved CheckOther::checkPassByReference to normal checking

This commit is contained in:
Daniel Marjamäki 2019-03-06 20:59:45 +01:00
parent 9d5f672dbc
commit f20936ed8a
2 changed files with 2 additions and 2 deletions

View File

@ -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();

View File

@ -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"