diff --git a/lib/symboldatabase.cpp b/lib/symboldatabase.cpp index 3fd3b4c88..9066592a9 100644 --- a/lib/symboldatabase.cpp +++ b/lib/symboldatabase.cpp @@ -5638,7 +5638,7 @@ const Function* Scope::findFunction(const Token *tok, bool requireConst) const } const Token* valuetok = arguments[j]; if (valuetok->str() == "::") { - const Token* rml = nextAfterAstRightmostLeaf(vartok); + const Token* rml = nextAfterAstRightmostLeaf(valuetok); if (rml) valuetok = rml->previous(); }