Cppcheck self-check; use Token::simpleMatch
This commit is contained in:
parent
4cccc710ef
commit
b61eaec5b4
|
@ -1122,7 +1122,7 @@ const Token* CheckUninitVar::isVariableUsage(const Token *vartok, bool pointer,
|
||||||
derefValue = valueExpr;
|
derefValue = valueExpr;
|
||||||
while (Token::Match(derefValue->astParent(), "+|-|*|[|.") ||
|
while (Token::Match(derefValue->astParent(), "+|-|*|[|.") ||
|
||||||
(derefValue->astParent() && derefValue->astParent()->isCast()) ||
|
(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();
|
const Token * const derefValueParent = derefValue->astParent();
|
||||||
if (derefValueParent->str() == "*") {
|
if (derefValueParent->str() == "*") {
|
||||||
if (derefValueParent->isUnaryOp("*"))
|
if (derefValueParent->isUnaryOp("*"))
|
||||||
|
|
Loading…
Reference in New Issue