Skip to content

unify detection of object mutation in clang-tidy checks #106374

Open
@firewave

Description

@firewave

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    clang-tidyenhancementImproving things as opposed to bug fixing, e.g. new or missing feature

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions