[polly] 1d549cf - [NFC] Fixes -Wrange-loop-analysis warnings
Mark de Wever via llvm-commits
llvm-commits at lists.llvm.org
Mon Jan 6 08:38:05 PST 2020
Author: Mark de Wever
Date: 2020-01-06T17:37:41+01:00
New Revision: 1d549cff48cd52b9967c3a70eeb61abf86444ac3
URL: https://github.com/llvm/llvm-project/commit/1d549cff48cd52b9967c3a70eeb61abf86444ac3
DIFF: https://github.com/llvm/llvm-project/commit/1d549cff48cd52b9967c3a70eeb61abf86444ac3.diff
LOG: [NFC] Fixes -Wrange-loop-analysis warnings
This avoids new warnings due to D68912 adds -Wrange-loop-analysis to -Wall.
Differential Revision: https://reviews.llvm.org/D72210
Added:
Modified:
mlir/lib/Dialect/Linalg/Utils/Utils.cpp
polly/lib/Analysis/ScopGraphPrinter.cpp
Removed:
################################################################################
diff --git a/mlir/lib/Dialect/Linalg/Utils/Utils.cpp b/mlir/lib/Dialect/Linalg/Utils/Utils.cpp
index b4efa6c24a20..66b82fd14e48 100644
--- a/mlir/lib/Dialect/Linalg/Utils/Utils.cpp
+++ b/mlir/lib/Dialect/Linalg/Utils/Utils.cpp
@@ -114,7 +114,7 @@ GenericLoopNestRangeBuilder<
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());
diff --git a/polly/lib/Analysis/ScopGraphPrinter.cpp b/polly/lib/Analysis/ScopGraphPrinter.cpp
index 8f5d6d250338..53affb15d6a0 100644
--- a/polly/lib/Analysis/ScopGraphPrinter.cpp
+++ b/polly/lib/Analysis/ScopGraphPrinter.cpp
@@ -178,7 +178,7 @@ struct DOTGraphTraits<ScopDetectionWrapperPass *>
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"
More information about the llvm-commits
mailing list