Skip to content

Commit

Permalink
Update checkclass.cpp
Browse files Browse the repository at this point in the history
  • Loading branch information
chrchr-github authored Aug 29, 2024
1 parent 54b4cdb commit ba0ee17
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/checkclass.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3326,7 +3326,10 @@ static const Variable* getSingleReturnVar(const Scope* scope) {
return nullptr;
if (!start->astOperand1() || start->str() != "return")
return nullptr;
return start->astOperand1()->variable();
const Token* tok = start->astOperand1();
if (tok->str() == ".")
tok = tok->astOperand2();
return tok->variable();
}

void CheckClass::checkReturnByReference()
Expand Down

0 comments on commit ba0ee17

Please sign in to comment.