Commit 28045026 authored by rdevlin.cronin's avatar rdevlin.cronin Committed by Commit bot

[V8] Run clang-tidy performance-for-range-copy check on src/

BUG=None

Review-Url: https://codereview.chromium.org/2609173005
Cr-Commit-Position: refs/heads/master@{#42094}
parent 12d20bdd
...@@ -134,10 +134,10 @@ std::ostream& operator<<(std::ostream& os, const AsPrintableStatistics& ps) { ...@@ -134,10 +134,10 @@ std::ostream& operator<<(std::ostream& os, const AsPrintableStatistics& ps) {
} }
if (!ps.machine_output) WriteHeader(os); if (!ps.machine_output) WriteHeader(os);
for (auto phase_kind_it : sorted_phase_kinds) { for (const auto& phase_kind_it : sorted_phase_kinds) {
const auto& phase_kind_name = phase_kind_it->first; const auto& phase_kind_name = phase_kind_it->first;
if (!ps.machine_output) { if (!ps.machine_output) {
for (auto phase_it : sorted_phases) { for (const auto& phase_it : sorted_phases) {
const auto& phase_stats = phase_it->second; const auto& phase_stats = phase_it->second;
if (phase_stats.phase_kind_name_ != phase_kind_name) continue; if (phase_stats.phase_kind_name_ != phase_kind_name) continue;
const auto& phase_name = phase_it->first; const auto& phase_name = phase_it->first;
......
...@@ -1253,7 +1253,7 @@ Node* JSCreateLowering::AllocateFastLiteral( ...@@ -1253,7 +1253,7 @@ Node* JSCreateLowering::AllocateFastLiteral(
AccessBuilder::ForJSArrayLength(boilerplate_array->GetElementsKind()), AccessBuilder::ForJSArrayLength(boilerplate_array->GetElementsKind()),
handle(boilerplate_array->length(), isolate())); handle(boilerplate_array->length(), isolate()));
} }
for (auto const inobject_field : inobject_fields) { for (auto const& inobject_field : inobject_fields) {
builder.Store(inobject_field.first, inobject_field.second); builder.Store(inobject_field.first, inobject_field.second);
} }
return builder.Finish(); return builder.Finish();
......
...@@ -247,7 +247,7 @@ Reduction JSNativeContextSpecialization::ReduceNamedAccess( ...@@ -247,7 +247,7 @@ Reduction JSNativeContextSpecialization::ReduceNamedAccess(
// TODO(turbofan): Add support for inlining into try blocks. // TODO(turbofan): Add support for inlining into try blocks.
bool is_exceptional = NodeProperties::IsExceptionalCall(node); bool is_exceptional = NodeProperties::IsExceptionalCall(node);
for (auto access_info : access_infos) { for (const auto& access_info : access_infos) {
if (access_info.IsAccessorConstant()) { if (access_info.IsAccessorConstant()) {
// Accessor in try-blocks are not supported yet. // Accessor in try-blocks are not supported yet.
if (is_exceptional || !(flags() & kAccessorInliningEnabled)) { if (is_exceptional || !(flags() & kAccessorInliningEnabled)) {
......
...@@ -25,7 +25,7 @@ bool TraceConfig::IsCategoryGroupEnabled(const char* category_group) const { ...@@ -25,7 +25,7 @@ bool TraceConfig::IsCategoryGroupEnabled(const char* category_group) const {
while (category_stream.good()) { while (category_stream.good()) {
std::string category; std::string category;
getline(category_stream, category, ','); getline(category_stream, category, ',');
for (auto included_category : included_categories_) { for (const auto& included_category : included_categories_) {
if (category == included_category) return true; if (category == included_category) return true;
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment