Fixed #2116 (Internal error. Token::Match called with varid 0)
This commit is contained in:
parent
eba827bc4b
commit
9ae4a758b8
|
@ -65,7 +65,7 @@ void CheckPostfixOperator::postfixOperator()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (result)
|
if (result && tok->previous()->varId())
|
||||||
{
|
{
|
||||||
const Token *decltok = Token::findmatch(_tokenizer->tokens(), "%varid%", tok->previous()->varId());
|
const Token *decltok = Token::findmatch(_tokenizer->tokens(), "%varid%", tok->previous()->varId());
|
||||||
if (decltok && Token::Match(decltok->previous(), "iterator|const_iterator|reverse_iterator|const_reverse_iterator"))
|
if (decltok && Token::Match(decltok->previous(), "iterator|const_iterator|reverse_iterator|const_reverse_iterator"))
|
||||||
|
|
Loading…
Reference in New Issue