Clarify condition: re-enabled check
This commit is contained in:
parent
f26bc6a75c
commit
3e1df1b463
|
@ -136,7 +136,10 @@ void CheckOther::clarifyCondition()
|
||||||
{
|
{
|
||||||
if (tok2->str() == "(" || tok2->str() == "[")
|
if (tok2->str() == "(" || tok2->str() == "[")
|
||||||
tok2 = tok2->link();
|
tok2 = tok2->link();
|
||||||
else if (tok2->str() == "||" || tok2->str() == "&&" || tok2->str() == "?")
|
else if (tok2->str() == "||" ||
|
||||||
|
tok2->str() == "&&" ||
|
||||||
|
tok2->str() == "?" ||
|
||||||
|
tok2->str() == ")")
|
||||||
break;
|
break;
|
||||||
else if (Token::Match(tok2, "<|<=|==|!=|>|>= %num% )"))
|
else if (Token::Match(tok2, "<|<=|==|!=|>|>= %num% )"))
|
||||||
{
|
{
|
||||||
|
|
|
@ -65,8 +65,7 @@ public:
|
||||||
checkOther.checkSizeofForArrayParameter();
|
checkOther.checkSizeofForArrayParameter();
|
||||||
checkOther.checkSelfAssignment();
|
checkOther.checkSelfAssignment();
|
||||||
|
|
||||||
// I'll just fix a few false positives and then uncomment
|
checkOther.clarifyCondition(); // not simplified because ifAssign
|
||||||
// checkOther.clarifyCondition(); // not simplified because ifAssign
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @brief Run checks against the simplified token list */
|
/** @brief Run checks against the simplified token list */
|
||||||
|
|
Loading…
Reference in New Issue