OSDN Git Service

Ensure moved-from container is cleared on move
authorGeorge Burgess IV <george.burgess.iv@gmail.com>
Mon, 11 Dec 2017 19:22:59 +0000 (19:22 +0000)
committerGeorge Burgess IV <george.burgess.iv@gmail.com>
Mon, 11 Dec 2017 19:22:59 +0000 (19:22 +0000)
commit1559083a44c32e2d1a70ef9bc5a4942414b4469a
treee55381c3e259443ab90c8c15ff82dd0cf1897397
parent1bc958a4c171fa30abf017afe532dc93e21feb97
Ensure moved-from container is cleared on move

In all cases except for this optimistic attempt to reuse memory, the
moved-from TinyPtrVector was left `empty()` at the end of this
assignment. Though using a container after it's been moved from can be a
bit sketchy, it's probably best to just be consistent here.

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