Clarify condition: re-enabled check

This commit is contained in:
Daniel Marjamäki 2011-03-13 12:16:55 +01:00
parent f26bc6a75c
commit 3e1df1b463
2 changed files with 5 additions and 3 deletions

View File

@ -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% )"))
{ {

View File

@ -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 */