CheckOther::checkDuplicateExpression: Added TODO comment to readd checking for duplicate separated expressions

This commit is contained in:
Daniel Marjamäki 2013-12-13 06:40:35 +01:00
parent 77a5ad03a6
commit 08cd0cd0f7
1 changed files with 1 additions and 0 deletions

View File

@ -2922,6 +2922,7 @@ void CheckOther::checkDuplicateExpression()
constStandardFunctions.insert("strcmp"); constStandardFunctions.insert("strcmp");
// Experimental implementation // Experimental implementation
// TODO: check for duplicate separated expressions: (a==1 || a==2 || a==1)
for (const Token *tok = scope->classStart; tok && tok != scope->classEnd; tok = tok->next()) { for (const Token *tok = scope->classStart; tok && tok != scope->classEnd; tok = tok->next()) {
if (tok->isOp() && tok->astOperand1() && !Token::Match(tok, "+|-|*|/|%|=|<<|>>")) { if (tok->isOp() && tok->astOperand1() && !Token::Match(tok, "+|-|*|/|%|=|<<|>>")) {
if (Token::Match(tok, "==|!=|-") && astIsFloat(tok->astOperand1())) if (Token::Match(tok, "==|!=|-") && astIsFloat(tok->astOperand1()))