Support :: in some more places

This commit is contained in:
PKEuS 2014-08-19 11:36:32 +02:00
parent 5d50e7e9ae
commit 69b7f91034
2 changed files with 2 additions and 2 deletions

View File

@ -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;

View File

@ -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;