Refactoring; Use isUnaryOp instead of simpleMatch

This commit is contained in:
Daniel Marjamäki 2021-05-10 18:18:02 +02:00
parent b013f1b3d0
commit 271acf8aee
1 changed files with 1 additions and 1 deletions

View File

@ -2680,7 +2680,7 @@ struct FwdAnalysis::Result FwdAnalysis::checkRecursive(const Token *expr, const
if (mWhat == What::Reassign)
return Result(Result::Type::BAILOUT, parent->astParent());
continue;
} else if (mWhat == What::UnusedValue && Token::simpleMatch(parent, "&") && Token::Match(parent->astParent(), "[,(]")) {
} else if (mWhat == What::UnusedValue && parent->isUnaryOp("&") && Token::Match(parent->astParent(), "[,(]")) {
// Pass variable to function the writes it
const Token *ftok = parent->astParent();
while (Token::simpleMatch(ftok, ","))