[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}
This commit is contained in:
parent
12d20bdd31
commit
2804502615
@ -134,10 +134,10 @@ std::ostream& operator<<(std::ostream& os, const AsPrintableStatistics& ps) {
|
||||
}
|
||||
|
||||
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;
|
||||
if (!ps.machine_output) {
|
||||
for (auto phase_it : sorted_phases) {
|
||||
for (const auto& phase_it : sorted_phases) {
|
||||
const auto& phase_stats = phase_it->second;
|
||||
if (phase_stats.phase_kind_name_ != phase_kind_name) continue;
|
||||
const auto& phase_name = phase_it->first;
|
||||
|
@ -1253,7 +1253,7 @@ Node* JSCreateLowering::AllocateFastLiteral(
|
||||
AccessBuilder::ForJSArrayLength(boilerplate_array->GetElementsKind()),
|
||||
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);
|
||||
}
|
||||
return builder.Finish();
|
||||
|
@ -247,7 +247,7 @@ Reduction JSNativeContextSpecialization::ReduceNamedAccess(
|
||||
|
||||
// TODO(turbofan): Add support for inlining into try blocks.
|
||||
bool is_exceptional = NodeProperties::IsExceptionalCall(node);
|
||||
for (auto access_info : access_infos) {
|
||||
for (const auto& access_info : access_infos) {
|
||||
if (access_info.IsAccessorConstant()) {
|
||||
// Accessor in try-blocks are not supported yet.
|
||||
if (is_exceptional || !(flags() & kAccessorInliningEnabled)) {
|
||||
|
@ -25,7 +25,7 @@ bool TraceConfig::IsCategoryGroupEnabled(const char* category_group) const {
|
||||
while (category_stream.good()) {
|
||||
std::string category;
|
||||
getline(category_stream, category, ',');
|
||||
for (auto included_category : included_categories_) {
|
||||
for (const auto& included_category : included_categories_) {
|
||||
if (category == included_category) return true;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user