fix
This commit is contained in:
parent
4189d7db46
commit
65d99feddf
|
@ -976,7 +976,10 @@ void CheckUnusedVar::checkFunctionVariableUsage_iterateScopes(const Scope* const
|
||||||
variables.read(tok->next()->varId(), tok);
|
variables.read(tok->next()->varId(), tok);
|
||||||
} else // addressof
|
} else // addressof
|
||||||
variables.use(tok->next()->varId(), tok); // use = read + write
|
variables.use(tok->next()->varId(), tok); // use = read + write
|
||||||
} else if (Token::Match(tok, ">> %var%")) {
|
} else if (Token::Match(tok, ">>|>>= %var%")) {
|
||||||
|
if (_tokenizer->isC() || tok->previous()->isStandardType())
|
||||||
|
variables.read(tok->next()->varId(), tok);
|
||||||
|
else
|
||||||
variables.use(tok->next()->varId(), tok); // use = read + write
|
variables.use(tok->next()->varId(), tok); // use = read + write
|
||||||
} else if (Token::Match(tok, "%var% >>|&") && Token::Match(tok->previous(), "[{};:]")) {
|
} else if (Token::Match(tok, "%var% >>|&") && Token::Match(tok->previous(), "[{};:]")) {
|
||||||
variables.read(tok->varId(), tok);
|
variables.read(tok->varId(), tok);
|
||||||
|
|
Loading…
Reference in New Issue