Tokenizer::simplifyKnownVariables: Fixed TODO test case.

This commit is contained in:
Daniel Marjamäki 2010-11-06 11:38:58 +01:00
parent 694853249f
commit 13c2a73d3f
2 changed files with 3 additions and 2 deletions

View File

@ -5982,7 +5982,8 @@ bool Tokenizer::simplifyKnownVariables()
}
// Variable is used in calculation..
if (Token::Match(tok3, "[=+-*/[] %varid% [=?+-*/;])]", varid) ||
if (((tok3->previous()->varId() > 0) && Token::Match(tok3, "& %varid%", varid)) ||
Token::Match(tok3, "[=+-*/[] %varid% [=?+-*/;])]", varid) ||
Token::Match(tok3, "[(=+-*/[] %varid% <<|>>", varid) ||
Token::Match(tok3, "<< %varid% [+-*/;])]", varid) ||
Token::Match(tok3, ">> %varid% [+-*/;])]", varid) ||

View File

@ -1598,7 +1598,7 @@ private:
"4:\n"
"5: return u@1 & v@2 ;\n"
"6: }\n";
TODO_ASSERT_EQUALS(expected, tokenizeDebugListing(code, true));
ASSERT_EQUALS(expected, tokenizeDebugListing(code, true));
}
{