[ADT] C++11ify SmallVector::erase's arguments from iterator to const_iterator
llvm-svn: 264330
diff --git a/llvm/unittests/ADT/SmallVectorTest.cpp b/llvm/unittests/ADT/SmallVectorTest.cpp
index 46f7021..7367ad4 100644
--- a/llvm/unittests/ADT/SmallVectorTest.cpp
+++ b/llvm/unittests/ADT/SmallVectorTest.cpp
@@ -459,7 +459,8 @@
SCOPED_TRACE("EraseTest");
this->makeSequence(this->theVector, 1, 3);
- this->theVector.erase(this->theVector.begin());
+ const auto &theConstVector = this->theVector;
+ this->theVector.erase(theConstVector.begin());
this->assertValuesInOrder(this->theVector, 2u, 2, 3);
}
@@ -468,7 +469,8 @@
SCOPED_TRACE("EraseRangeTest");
this->makeSequence(this->theVector, 1, 3);
- this->theVector.erase(this->theVector.begin(), this->theVector.begin() + 2);
+ const auto &theConstVector = this->theVector;
+ this->theVector.erase(theConstVector.begin(), theConstVector.begin() + 2);
this->assertValuesInOrder(this->theVector, 1u, 3);
}