Support :: in some more places
This commit is contained in:
parent
5d50e7e9ae
commit
69b7f91034
|
@ -341,7 +341,7 @@ void CheckBool::checkAssignBoolToPointer()
|
|||
for (const Token* tok = scope->classStart; tok != scope->classEnd; tok = tok->next()) {
|
||||
if (tok->str() == "=" && astIsBool(tok->astOperand2())) {
|
||||
const Token *lhs = tok->astOperand1();
|
||||
while (lhs && lhs->str() == ".")
|
||||
while (lhs && (lhs->str() == "." || lhs->str() == "::"))
|
||||
lhs = lhs->astOperand2();
|
||||
if (!lhs || !lhs->variable() || !lhs->variable()->isPointer())
|
||||
continue;
|
||||
|
|
|
@ -239,7 +239,7 @@ static bool isVariableChanged(const Token *start, const Token *end, const unsign
|
|||
return true;
|
||||
|
||||
const Token *parent = tok->astParent();
|
||||
while (parent && parent->str() == ".")
|
||||
while (parent && (parent->str() == "." || parent->str() == "::"))
|
||||
parent = parent->astParent();
|
||||
if (parent && parent->type() == Token::eIncDecOp)
|
||||
return true;
|
||||
|
|
Loading…
Reference in New Issue