HomePhabricator

[mlir] Fix -Wrange-loo-analysis warnings

Authored by MaskRay on Jan 1 2020, 3:55 PM.

Description

[mlir] Fix -Wrange-loo-analysis warnings

for (const auto &x : llvm::zip(..., ...))

->

for (auto x : llvm::zip(..., ...))

The return type of zip() is a wrapper that wraps a tuple of references.

warning: loop variable 'p' is always a copy because the range of type 'detail::zippy<detail::zip_shortest, ArrayRef<long> &, ArrayRef<long> &>' does not return a reference [-Wrange-loop-analysis]

Details

Committed
MaskRayJan 1 2020, 4:06 PM
Parents
rG681b1be77496: [lld] Fix -Wrange-loop-analysis warnings
Branches
Unknown
Tags
Unknown