isLikelyStreamRead: when using & dont allow astParent
This commit is contained in:
parent
e1db4c0e2c
commit
121d4ff2ba
|
@ -636,6 +636,8 @@ bool isLikelyStreamRead(bool cpp, const Token *op)
|
||||||
parent = parent->astParent();
|
parent = parent->astParent();
|
||||||
if (parent->astParent() && !Token::Match(parent->astParent(), "%oror%|&&|(|,|!"))
|
if (parent->astParent() && !Token::Match(parent->astParent(), "%oror%|&&|(|,|!"))
|
||||||
return false;
|
return false;
|
||||||
|
if (op->str() == "&" && parent->astParent())
|
||||||
|
return false;
|
||||||
if (!parent->astOperand1() || !parent->astOperand2())
|
if (!parent->astOperand1() || !parent->astOperand2())
|
||||||
return false;
|
return false;
|
||||||
return (!parent->astOperand1()->valueType() || !parent->astOperand1()->valueType()->isIntegral());
|
return (!parent->astOperand1()->valueType() || !parent->astOperand1()->valueType()->isIntegral());
|
||||||
|
|
Loading…
Reference in New Issue