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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210430
91177308-0d34-0410-b5e6-
96231b3b80d8
}
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;
}
Constructable & operator=(const Constructable & src) {
EXPECT_TRUE(constructed);
- EXPECT_TRUE(src.constructed);
value = src.value;
++numAssignmentCalls;
return *this;
Constructable & operator=(Constructable && src) {
EXPECT_TRUE(constructed);
- EXPECT_TRUE(src.constructed);
value = src.value;
- src.value = -1;
++numAssignmentCalls;
return *this;
}