Skip to content

Add performance-move-const-arg and performance-unnecessary-value-param checks to clang-tidy #113804

@jmagman

Description

@jmagman

flutter/engine#36221 fixed a lot of these issues, but there are still performance-move-const-arg failures in Linux Android clang-tidy
https://logs.chromium.org/logs/flutter/buildbucket/cr-buildbucket/8799825936871750113/+/u/test:_lint_android_debug_arm64/stdout

❌ Failures for clang-tidy on /b/s/w/ir/cache/builder/src/flutter/flow/diff_context.cc:
/b/s/w/ir/cache/builder/src/flutter/flow/diff_context.cc:205:24: error: std::move of the variable 'readback' of the trivially-copyable type 'Readback' has no effect [performance-move-const-arg,-warnings-as-errors]
  readbacks_.push_back(std::move(readback));

All platforms had performance-unnecessary-value-param errors:
https://logs.chromium.org/logs/flutter/buildbucket/cr-buildbucket/8799824923980615249/+/u/test:_lint_ios_debug_sim/stdout
https://logs.chromium.org/logs/flutter/buildbucket/cr-buildbucket/8799824923980615265/+/u/test:_lint_host_debug/stdout
https://logs.chromium.org/logs/flutter/buildbucket/cr-buildbucket/8799824923350402209/+/u/test:_lint_host_debug/stdout
https://logs.chromium.org/logs/flutter/buildbucket/cr-buildbucket/8799824923350402193/+/u/test:_lint_android_debug_arm64/stdout

Fix the errors, and turn these checks on. More context: flutter/engine#36885 (comment)

cc @gaaclarke

Metadata

Metadata

Assignees

No one assigned

    Labels

    P1High-priority issues at the top of the work listc: contributor-productivityTeam-specific productivity, code health, technical debt.engineflutter/engine related. See also e: labels.team-engineOwned by Engine team

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions