Open
Description
Weirdly, those two checks are using distinct methods to infer whether the underlying container is mutated. unnecessary-copy-initialization
uses doesNotMutateObject
while performance-unnecessary-value-param
uses FunctionParmMutationAnalyzer
.
So unfortunately this change won't improve performance-unnecessary-value-param
.
I can have a look at unifying both in a subsequent PR.
Originally posted by @legrosbuffle in #94362 (comment)