temporarily disable duplicateConditionalAssign
This commit is contained in:
parent
0ca217daef
commit
76e13c45c7
|
@ -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;
|
||||
|
||||
|
|
|
@ -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"
|
||||
|
|
Loading…
Reference in New Issue