Fix some performance-unnecessary-value-param tidy and performance-for-range warnings.
art/profman/profile_assistant_test.cc:119:54: error: the const qualified parameter 'hot_methods' is copied for each invocation; consider making it a reference [performance-unnecessary-value-param,-warnings-as-errors]
const std::vector<uint32_t> hot_methods,
^
&
art/profman/profile_assistant_test.cc:120:54: error: the const qualified parameter 'startup_methods' is copied for each invocation; consider making it a reference [performance-unnecessary-value-param,-warnings-as-errors]
const std::vector<uint32_t> startup_methods,
^
&
art/profman/profile_assistant_test.cc:121:54: error: the const qualified parameter 'post_startup_methods' is copied for each invocation; consider making it a reference [performance-unnecessary-value-param,-warnings-as-errors]
const std::vector<uint32_t> post_startup_methods,
^
&
art/runtime/subtype_check_info_test.cc:134:56: error: the parameter 'sc' is copied for each invocation but only used as a const reference; consider making it a const reference [performance-unnecessary-value-param,-warnings-as-errors]
static SubtypeCheckInfo CopyCleared(SubtypeCheckInfo sc) {
~~~~~~~~~~~~~~~~ ^
const &
art/runtime/class_linker.cc:6451:62: error: the parameter 'to_process' is copied for each invocation but only used as a const reference; consider making it a const reference [performance-unnecessary-value-param,-warnings-as-errors]
std::vector<ObjPtr<mirror::Class>> to_process)
~~~ ^
const &
art/runtime/trace.cc:1127:13: error: loop variable is copied but only used as const reference; consider making it a const reference [performance-for-range-copy,-warnings-as-errors]
for (auto it : exited_threads_) {
~~~~ ^
const &
art/runtime/oat_file_manager.cc:154:41: error: the parameter 'spaces' is copied for each invocation but only used as a const reference; consider making it a const reference [performance-unnecessary-value-param,-warnings-as-errors]
std::vector<gc::space::ImageSpace*> spaces) {
~~~ ^
const &
art/test/004-JniTest/jni_test.cc:707:72: error: the parameter 'methods' is copied for each invocation but only used as a const reference; consider making it a const reference [performance-unnecessary-value-param,-warnings-as-errors]
void TestCalls(const char* declaring_class, std::vector<const char*> methods) {
~~~ ^
const &
art/compiler/optimizing/optimizing_compiler.cc:1409:89: error: the parameter 'info' is copied for each invocation but only used as a const reference; consider making it a const reference [performance-unnecessary-value-param,-warnings-as-errors]
void OptimizingCompiler::GenerateJitDebugInfo(ArtMethod* method, debug::MethodDebugInfo info) {
~~~~~ ^
const &
Bug: http://b/32619234
Bug: http://b/110779387
Test: Build using WITH_TIDY=1
Change-Id: I911d838b8c26ddab3d6a64024f3220000f078cba
8 files changed