Commit 620158f8 authored by Darshan Sen's avatar Darshan Sen Committed by V8 LUCI CQ

[cleanup] Fix -Wrange-loop-analysis compiler warning

Here is the warning:

```
src/compiler/persistent-map.h:81:47: warning: loop variable 'triple' is always a copy because the range of type
      'v8::internal::compiler::PersistentMap<v8::internal::compiler::Variable, v8::internal::compiler::Node *, v8::base::hash<v8::internal::compiler::Variable> >::ZipIterable'
      does not return a reference [-Wrange-loop-analysis]
    for (const std::tuple<Key, Value, Value>& triple : Zip(other)) {
```

So this changes the const ref into a copy.
Signed-off-by: 's avatarDarshan Sen <raisinten@gmail.com>
Change-Id: I28bdd4e28e7536bd8dcb17cf2a6bf3342a79f504
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3459925Reviewed-by: 's avatarTobias Tebbi <tebbi@chromium.org>
Commit-Queue: Tobias Tebbi <tebbi@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79072}
parent 59ea4881
......@@ -78,7 +78,7 @@ class PersistentMap {
bool operator==(const PersistentMap& other) const {
if (tree_ == other.tree_) return true;
if (def_value_ != other.def_value_) return false;
for (const std::tuple<Key, Value, Value>& triple : Zip(other)) {
for (std::tuple<Key, Value, Value> triple : Zip(other)) {
if (std::get<1>(triple) != std::get<2>(triple)) return false;
}
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