From 69b7f910345d02c040f818b6d0dce6a02af1f9a4 Mon Sep 17 00:00:00 2001 From: PKEuS Date: Tue, 19 Aug 2014 11:36:32 +0200 Subject: [PATCH] Support :: in some more places --- lib/checkbool.cpp | 2 +- lib/valueflow.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/checkbool.cpp b/lib/checkbool.cpp index 83701d46c..bd1c6f8ba 100644 --- a/lib/checkbool.cpp +++ b/lib/checkbool.cpp @@ -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; diff --git a/lib/valueflow.cpp b/lib/valueflow.cpp index cf70d5937..d7e0cec40 100644 --- a/lib/valueflow.cpp +++ b/lib/valueflow.cpp @@ -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;