temporarily disable duplicateConditionalAssign

This commit is contained in:
Daniel Marjamäki 2019-04-25 07:44:19 +02:00
parent 0ca217daef
commit 76e13c45c7
2 changed files with 7 additions and 3 deletions

View File

@ -1543,6 +1543,10 @@ void CheckCondition::pointerAdditionResultNotNullError(const Token *tok, const T
void CheckCondition::checkDuplicateConditionalAssign()
{
// danmar: this is disabled until #9103 is fixed.
// the output should be clarified somehow.. see #9101
return;
if (!mSettings->isEnabled(Settings::STYLE))
return;

View File

@ -3084,13 +3084,13 @@ private:
" if (x == y)\n"
" x = y;\n"
"}\n");
ASSERT_EQUALS("[test.cpp:2] -> [test.cpp:3]: (style) Duplicate expression for the condition and assignment.\n", errout.str());
TODO_ASSERT_EQUALS("[test.cpp:2] -> [test.cpp:3]: (style) Duplicate expression for the condition and assignment.\n", "", errout.str());
check("void f(int& x, int y) {\n"
" if (x != y)\n"
" x = y;\n"
"}\n");
ASSERT_EQUALS("[test.cpp:3] -> [test.cpp:2]: (style) Duplicate expression for the condition and assignment.\n", errout.str());
TODO_ASSERT_EQUALS("[test.cpp:3] -> [test.cpp:2]: (style) Duplicate expression for the condition and assignment.\n", "", errout.str());
check("void f(int& x, int y) {\n"
" if (x == y)\n"
@ -3098,7 +3098,7 @@ private:
" else\n"
" x = 1;\n"
"}\n");
ASSERT_EQUALS("[test.cpp:2] -> [test.cpp:3]: (style) Duplicate expression for the condition and assignment.\n", errout.str());
TODO_ASSERT_EQUALS("[test.cpp:2] -> [test.cpp:3]: (style) Duplicate expression for the condition and assignment.\n", "", errout.str());
check("void f(int& x, int y) {\n"
" if (x != y)\n"