diff --git a/lib/checkclass.cpp b/lib/checkclass.cpp index a57636d43..396ffe05c 100644 --- a/lib/checkclass.cpp +++ b/lib/checkclass.cpp @@ -1850,7 +1850,7 @@ bool CheckClass::checkConstFunc(const Scope *scope, const Function *func, bool& return (false); - const Token* lhs = tok1->tokAt(-1); + const Token* lhs = tok1->previous(); if (lhs->str() == "&") { lhs = lhs->previous(); if (lhs->tokType() == Token::eAssignmentOp && lhs->previous()->variable()) {