Fix a use of uninitialized memory in SmallVector's move-assignment operator.
authorDouglas Gregor <dgregor@apple.com>
Wed, 30 Apr 2014 15:49:06 +0000 (15:49 +0000)
committerDouglas Gregor <dgregor@apple.com>
Wed, 30 Apr 2014 15:49:06 +0000 (15:49 +0000)
commit3bdb9015b1226c33231794c1ace84cd5b8a7e6f3
tree7cc92aeb99609b844538cc3a0974937ac2c8b0a3
parent41fb11790562745484a1aaade7377d11d970972a
Fix a use of uninitialized memory in SmallVector's move-assignment operator.

When we were moving from a larger vector to a smaller one but didn't
need to re-allocate, we would move-assign over uninitialized memory in
the target, then move-construct that same data again.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207663 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/ADT/SmallVector.h
unittests/ADT/SmallVectorTest.cpp