Fix #580 (double free not found)

http://sourceforge.net/apps/trac/cppcheck/ticket/580
This commit is contained in:
Reijo Tomperi 2009-10-06 12:44:53 +03:00
parent 13fbd616da
commit c55140d4cd
2 changed files with 2 additions and 2 deletions

View File

@ -2266,7 +2266,7 @@ bool Tokenizer::simplifyConditions()
if ((tok->str() == "&&" || tok->str() == "||" || tok->str() == "(") &&
(Token::Match(tok->tokAt(1), "%num% %any% %num%") ||
Token::Match(tok->tokAt(1), "%bool% %any% %bool%")) &&
(tok4->str() == "&&" || tok4->str() == "||" || tok4->str() == ")"))
(tok4->str() == "&&" || tok4->str() == "||" || tok4->str() == ")" || tok4->str() == "?"))
{
std::string cmp = tok->strAt(2);
bool result = false;

View File

@ -1890,7 +1890,7 @@ private:
" if (13>12?true:false);\n"
"}\n";
TODO_ASSERT_EQUALS("void f ( ) { { ; } }", tok(code));
ASSERT_EQUALS("void f ( ) { { ; } }", tok(code));
}
}
};