You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
I think the target of two functions is totally different. isOnlyUsedAsConst want to detect the usage of object itself. MutationAnalyzer want to detect mutation of the symbol of this object.
e.g.
For symbol a, a = A{}, isOnlyUsedAsConst should not treat it as non-const usage but MutationAnalyzer should treat it as mutation.
Uh oh!
There was an error while loading. Please reload this page.
Weirdly, those two checks are using distinct methods to infer whether the underlying container is mutated.
unnecessary-copy-initialization
usesdoesNotMutateObject
whileperformance-unnecessary-value-param
usesFunctionParmMutationAnalyzer
.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)
The text was updated successfully, but these errors were encountered: