Merge branch 'master' of github.com:danmar/cppcheck

This commit is contained in:
Kimmo Varis 2010-01-06 01:40:52 +02:00
commit df64a15f2d
1 changed files with 11 additions and 1 deletions

View File

@ -5068,9 +5068,10 @@ void Tokenizer::removeExceptionSpecifications(Token *tok) const
bool Tokenizer::validate() const bool Tokenizer::validate() const
{ {
std::stack<const Token *> linktok; std::stack<const Token *> linktok;
const Token *lastTok = 0;
for (const Token *tok = tokens(); tok; tok = tok->next()) for (const Token *tok = tokens(); tok; tok = tok->next())
{ {
lastTok = tok;
if (Token::Match(tok, "[{([]")) if (Token::Match(tok, "[{([]"))
{ {
if (tok->link() == 0) if (tok->link() == 0)
@ -5126,6 +5127,15 @@ bool Tokenizer::validate() const
return false; return false;
} }
if (lastTok != _tokensBack)
{
// TODO, the two lines below should be uncommented and
// problems that appear with testrunner should be fixed
//cppcheckError(lastTok);
//return false;
}
return true; return true;
} }