summaryrefslogtreecommitdiffstats
path: root/llvm/unittests/ADT/SmallVectorTest.cpp
diff options
context:
space:
mode:
authorDavid Blaikie <dblaikie@gmail.com>2014-06-08 17:33:47 +0000
committerDavid Blaikie <dblaikie@gmail.com>2014-06-08 17:33:47 +0000
commit8ef8b7373e822d66336d50c7a0a6078aa59e8acd (patch)
tree219327be70f27996a8f1a5a47fcea35f9bf031d5 /llvm/unittests/ADT/SmallVectorTest.cpp
parent40d4e34a1fa3efce647338c3929c2ad3244177f0 (diff)
downloadbcm5719-llvm-8ef8b7373e822d66336d50c7a0a6078aa59e8acd.tar.gz
bcm5719-llvm-8ef8b7373e822d66336d50c7a0a6078aa59e8acd.zip
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. llvm-svn: 210430
Diffstat (limited to 'llvm/unittests/ADT/SmallVectorTest.cpp')
-rw-r--r--llvm/unittests/ADT/SmallVectorTest.cpp6
1 files changed, 0 insertions, 6 deletions
diff --git a/llvm/unittests/ADT/SmallVectorTest.cpp b/llvm/unittests/ADT/SmallVectorTest.cpp
index 935c761ca78..cceed7b92c4 100644
--- a/llvm/unittests/ADT/SmallVectorTest.cpp
+++ b/llvm/unittests/ADT/SmallVectorTest.cpp
@@ -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;
}
OpenPOWER on IntegriCloud