Skip to content

Commit

Permalink
Address reviewer comments
Browse files Browse the repository at this point in the history
  • Loading branch information
chrchr-github committed Aug 7, 2023
1 parent 532f789 commit 574ad3a
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions lib/valueflow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4250,8 +4250,9 @@ static bool hasBorrowingVariables(const std::list<Variable>& vars, const std::ve
return std::any_of(vars.cbegin(), vars.cend(), [&](const Variable& var) {
const ValueType* vt = var.valueType();
if (vt) {
if (std::none_of(args.begin(), args.end(), [vt](const Token* arg) {
return arg->valueType() && arg->valueType()->type == vt->type;
if (vt->pointer > 0 &&
std::none_of(args.begin(), args.end(), [vt](const Token* arg) {
return arg->valueType() && arg->valueType()->type == vt->type;
}))
return false;
if (vt->pointer > 0)
Expand All @@ -4268,7 +4269,7 @@ static bool hasBorrowingVariables(const std::list<Variable>& vars, const std::ve
if (vt->typeScope)
return hasBorrowingVariables(vt->typeScope->varlist, args, depth - 1);
}
return false;
return true;
});
}

Expand Down

0 comments on commit 574ad3a

Please sign in to comment.