[llvm] r210430 - SmallVectorTest: Remove some more robust checks added in r210429 since they caught some bugs I haven't fixed yet.
David Blaikie
dblaikie at gmail.com
Sun Jun 8 10:33:47 PDT 2014
Author: dblaikie
Date: Sun Jun 8 12:33:47 2014
New Revision: 210430
URL: http://llvm.org/viewvc/llvm-project?rev=210430&view=rev
Log:
SmallVectorTest: Remove some more robust checks added in r210429 since they caught some bugs I haven't fixed yet.
Specifically this caused inserting an element from a SmallVector into
itself when such an insertion would cause a reallocation. We have code
to handle this for non-reallocating cases, but it's not robust against
reallocation.
Modified:
llvm/trunk/unittests/ADT/SmallVectorTest.cpp
Modified: llvm/trunk/unittests/ADT/SmallVectorTest.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/unittests/ADT/SmallVectorTest.cpp?rev=210430&r1=210429&r2=210430&view=diff
==============================================================================
--- llvm/trunk/unittests/ADT/SmallVectorTest.cpp (original)
+++ llvm/trunk/unittests/ADT/SmallVectorTest.cpp Sun Jun 8 12:33:47 2014
@@ -42,15 +42,12 @@ public:
}
Constructable(const Constructable & src) : constructed(true) {
- EXPECT_TRUE(src.constructed);
value = src.value;
++numConstructorCalls;
}
Constructable(Constructable && src) : constructed(true) {
- EXPECT_TRUE(src.constructed);
value = src.value;
- src.value = -1;
++numConstructorCalls;
}
@@ -62,7 +59,6 @@ public:
Constructable & operator=(const Constructable & src) {
EXPECT_TRUE(constructed);
- EXPECT_TRUE(src.constructed);
value = src.value;
++numAssignmentCalls;
return *this;
@@ -70,9 +66,7 @@ public:
Constructable & operator=(Constructable && src) {
EXPECT_TRUE(constructed);
- EXPECT_TRUE(src.constructed);
value = src.value;
- src.value = -1;
++numAssignmentCalls;
return *this;
}
More information about the llvm-commits
mailing list