uncomment validation of Tokenizer::_tokensBack

This commit is contained in:
Daniel Marjamäki 2010-01-06 21:18:42 +01:00
parent 57d1da3910
commit 94b0cbbcff
2 changed files with 4 additions and 6 deletions

View File

@ -142,7 +142,7 @@ void Token::replace(Token *replaceThis, Token *start, Token *end)
start->previous(replaceThis->previous());
end->next(replaceThis->next());
if (end->tokensBack && *(end->tokensBack) == replaceThis)
if (end->tokensBack && *(end->tokensBack) == end)
{
while (end->next())
end = end->next();

View File

@ -5126,13 +5126,11 @@ bool Tokenizer::validate() const
return false;
}
// Validate that the Tokenizer::_tokensBack is updated correctly during simplifications
if (lastTok != _tokensBack)
{
// TODO, the two lines below should be uncommented and
// problems that appear with testrunner should be fixed
//cppcheckError(lastTok);
//return false;
cppcheckError(lastTok);
return false;
}
return true;