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 Apr 11, 2024
1 parent 754b007 commit 7adfb08
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/checkclass.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3332,6 +3332,8 @@ void CheckClass::checkReturnByReference()
if (const Variable* var = getSingleReturnVar(func.functionScope)) {
if (!var->valueType())
continue;
if (var->isArgument())
continue;
const bool isContainer = var->valueType()->type == ValueType::Type::CONTAINER && var->valueType()->container;
const bool isView = isContainer && var->valueType()->container->view;
bool warn = isContainer && !isView;
Expand Down

0 comments on commit 7adfb08

Please sign in to comment.