summaryrefslogtreecommitdiffstats
path: root/gnu/llvm/unittests/ADT/SmallVectorTest.cpp
diff options
context:
space:
mode:
authorpatrick <patrick@openbsd.org>2017-01-14 19:55:43 +0000
committerpatrick <patrick@openbsd.org>2017-01-14 19:55:43 +0000
commitbd3306aecb3a15e8967143b8cdbbccf2b1b19b74 (patch)
tree309a8132b44564b9e634c0da6815187ce8eab27c /gnu/llvm/unittests/ADT/SmallVectorTest.cpp
parentkillp -a should not kill the window if only one pane. (diff)
downloadwireguard-openbsd-bd3306aecb3a15e8967143b8cdbbccf2b1b19b74.tar.xz
wireguard-openbsd-bd3306aecb3a15e8967143b8cdbbccf2b1b19b74.zip
Import LLVM 3.9.1 including clang and lld.
Diffstat (limited to 'gnu/llvm/unittests/ADT/SmallVectorTest.cpp')
-rw-r--r--gnu/llvm/unittests/ADT/SmallVectorTest.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/gnu/llvm/unittests/ADT/SmallVectorTest.cpp b/gnu/llvm/unittests/ADT/SmallVectorTest.cpp
index 46f7021ac16..7367ad470e3 100644
--- a/gnu/llvm/unittests/ADT/SmallVectorTest.cpp
+++ b/gnu/llvm/unittests/ADT/SmallVectorTest.cpp
@@ -459,7 +459,8 @@ TYPED_TEST(SmallVectorTest, EraseTest) {
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 @@ TYPED_TEST(SmallVectorTest, EraseRangeTest) {
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);
}