From b61eaec5b4e6ebf68465fbdb94c4e0e2cd7435fa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Marjam=C3=A4ki?= Date: Mon, 24 May 2021 21:14:54 +0200 Subject: [PATCH] Cppcheck self-check; use Token::simpleMatch --- lib/checkuninitvar.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/checkuninitvar.cpp b/lib/checkuninitvar.cpp index d2a3ce580..e32400738 100644 --- a/lib/checkuninitvar.cpp +++ b/lib/checkuninitvar.cpp @@ -1122,7 +1122,7 @@ const Token* CheckUninitVar::isVariableUsage(const Token *vartok, bool pointer, derefValue = valueExpr; while (Token::Match(derefValue->astParent(), "+|-|*|[|.") || (derefValue->astParent() && derefValue->astParent()->isCast()) || - (deref < arrayDim && Token::Match(derefValue->astParent(), "&") && derefValue->astParent()->isBinaryOp())) { + (deref < arrayDim && Token::simpleMatch(derefValue->astParent(), "&") && derefValue->astParent()->isBinaryOp())) { const Token * const derefValueParent = derefValue->astParent(); if (derefValueParent->str() == "*") { if (derefValueParent->isUnaryOp("*"))