Added more validating code to tokenizer. Currently commented out.
This commit is contained in:
parent
e6cc897e29
commit
ff0573998a
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue