[llvm] 5e0e0e3 - [NFC] Fixes -Wrange-loop-analysis warnings
Mark de Wever via llvm-commits
llvm-commits at lists.llvm.org
Mon Jan 6 15:52:03 PST 2020
Author: Mark de Wever
Date: 2020-01-07T00:51:41+01:00
New Revision: 5e0e0e3ff05f57b9495db57b6b205492d34cb5a8
URL: https://github.com/llvm/llvm-project/commit/5e0e0e3ff05f57b9495db57b6b205492d34cb5a8
DIFF: https://github.com/llvm/llvm-project/commit/5e0e0e3ff05f57b9495db57b6b205492d34cb5a8.diff
LOG: [NFC] Fixes -Wrange-loop-analysis warnings
This avoids new warnings due to D68912 adds -Wrange-loop-analysis to -Wall.
Added:
Modified:
llvm/unittests/Support/ReverseIterationTest.cpp
Removed:
################################################################################
diff --git a/llvm/unittests/Support/ReverseIterationTest.cpp b/llvm/unittests/Support/ReverseIterationTest.cpp
index 05804e69c260..657368283efc 100644
--- a/llvm/unittests/Support/ReverseIterationTest.cpp
+++ b/llvm/unittests/Support/ReverseIterationTest.cpp
@@ -45,7 +45,7 @@ TEST(ReverseIterationTest, DenseMapTest1) {
int IterKeys[] = { 2, 4, 1, 3 };
// Check that the DenseMap is iterated in the expected order.
- for (const auto &Tuple : zip(Map, IterKeys))
+ for (auto Tuple : zip(Map, IterKeys))
ASSERT_EQ(std::get<0>(Tuple).first, std::get<1>(Tuple));
// Check operator++ (post-increment).
@@ -99,7 +99,7 @@ TEST(ReverseIterationTest, DenseMapTest2) {
std::reverse(&Keys[0], &Keys[4]);
// Check that the DenseMap is iterated in the expected order.
- for (const auto &Tuple : zip(Map, Keys))
+ for (auto Tuple : zip(Map, Keys))
ASSERT_EQ(std::get<0>(Tuple).second, std::get<1>(Tuple)->value);
// Check operator++ (post-increment).
More information about the llvm-commits
mailing list