From 0c578f69c57bfd077c52f42c0e769a883f93cc0e Mon Sep 17 00:00:00 2001 From: Mark de Wever Date: Tue, 7 Jan 2020 00:49:41 +0100 Subject: [PATCH] [NFC] Fixes -Wrange-loop-analysis warnings This avoids new warnings due to D68912 adds -Wrange-loop-analysis to -Wall. --- unittests/Support/ReverseIterationTest.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/unittests/Support/ReverseIterationTest.cpp b/unittests/Support/ReverseIterationTest.cpp index 05804e69c26..657368283ef 100644 --- a/unittests/Support/ReverseIterationTest.cpp +++ b/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).