[PATCH] D72210: [NFC] Fixes -Wrange-loop-analysis warnings

Mark de Wever via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 6 08:38:40 PST 2020


This revision was automatically updated to reflect the committed changes.
Closed by commit rG1d549cff48cd: [NFC] Fixes -Wrange-loop-analysis warnings (authored by Mordante).

Changed prior to commit:
  https://reviews.llvm.org/D72210?vs=236239&id=236382#toc

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D72210/new/

https://reviews.llvm.org/D72210

Files:
  mlir/lib/Dialect/Linalg/Utils/Utils.cpp
  polly/lib/Analysis/ScopGraphPrinter.cpp


Index: polly/lib/Analysis/ScopGraphPrinter.cpp
===================================================================
--- polly/lib/Analysis/ScopGraphPrinter.cpp
+++ polly/lib/Analysis/ScopGraphPrinter.cpp
@@ -178,7 +178,7 @@
 
     RegionInfo *RI = R->getRegionInfo();
 
-    for (const auto &BB : R->blocks())
+    for (BasicBlock *BB : R->blocks())
       if (RI->getRegionFor(BB) == R)
         O.indent(2 * (depth + 1))
             << "Node"
Index: mlir/lib/Dialect/Linalg/Utils/Utils.cpp
===================================================================
--- mlir/lib/Dialect/Linalg/Utils/Utils.cpp
+++ mlir/lib/Dialect/Linalg/Utils/Utils.cpp
@@ -114,7 +114,7 @@
   SmallVector<ValueHandle, 4> lbs;
   SmallVector<ValueHandle, 4> ubs;
   SmallVector<int64_t, 4> steps;
-  for (const Value range : ranges) {
+  for (Value range : ranges) {
     assert(range.getType() && "expected linalg.range type");
     assert(range.getDefiningOp() && "need operations to extract range parts");
     RangeOp rangeOp = cast<RangeOp>(range.getDefiningOp());


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D72210.236382.patch
Type: text/x-patch
Size: 1047 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200106/97d4bd57/attachment.bin>


More information about the llvm-commits mailing list