Skip to content

Commit 7e345b3

Browse files
Update valueflow.cpp
1 parent ef06677 commit 7e345b3

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎lib/valueflow.cpp‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5738,11 +5738,11 @@ static void valueFlowSubFunction(const TokenList& tokenlist,
57385738
// passing value(s) to function
57395739
std::list<ValueFlow::Value> argvalues(getFunctionArgumentValues(argtok));
57405740

5741-
// Remove non-local lifetimes
5741+
// Remove non-local lifetimes and moved values
57425742
argvalues.remove_if([](const ValueFlow::Value& v) {
57435743
if (v.isLifetimeValue())
57445744
return !v.isLocalLifetimeValue() && !v.isSubFunctionLifetimeValue();
5745-
return false;
5745+
return v.isMovedValue();
57465746
});
57475747
// Remove uninit values if argument is passed by value
57485748
if (argtok->variable() && !argtok->variable()->isPointer() && argvalues.size() == 1 &&

0 commit comments

Comments
 (0)