parent
c65d79c0ec
commit
ad0ebd8f1a
|
@ -2061,9 +2061,9 @@ void CheckOther::duplicateExpressionError(const Token *tok1, const Token *tok2,
|
||||||
std::string msg = "Same expression on both sides of \'" + op + "\'";
|
std::string msg = "Same expression on both sides of \'" + op + "\'";
|
||||||
if (expr1 != expr2) {
|
if (expr1 != expr2) {
|
||||||
std::string exprMsg = "The expression \'" + expr1 + " " + op + " " + expr2 + "\' is always ";
|
std::string exprMsg = "The expression \'" + expr1 + " " + op + " " + expr2 + "\' is always ";
|
||||||
if(Token::Match(opTok, "==|>=|<="))
|
if (Token::Match(opTok, "==|>=|<="))
|
||||||
msg = exprMsg + "true";
|
msg = exprMsg + "true";
|
||||||
else if(Token::Match(opTok, "!=|>|<"))
|
else if (Token::Match(opTok, "!=|>|<"))
|
||||||
msg = exprMsg + "false";
|
msg = exprMsg + "false";
|
||||||
msg += " because '" + expr1 + "' and '" + expr2 + "' represent the same value";
|
msg += " because '" + expr1 + "' and '" + expr2 + "' represent the same value";
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue