After years of telling people: 'If you ever find any of my code that self-move-assigns, send me a bug report.' Somebody finally took me up on it.  vector::erase(begin(), begin()) does a self-move-assign of every element in the vector, leaving all of those elements in an unspecified state.  I checked the other containers for this same bug and did not find it.  Added test case.

llvm-svn: 179760
Cr-Mirrored-From: sso://chromium.googlesource.com/_direct/external/github.com/llvm/llvm-project
Cr-Mirrored-Commit: ab65a6f560438af4eb60aa0d66a44c044debf37b
diff --git a/include/vector b/include/vector
index d1bc23e..e04c267 100644
--- a/include/vector
+++ b/include/vector
@@ -1615,7 +1615,8 @@
     _LIBCPP_ASSERT(__first <= __last, "vector::erase(first, last) called with invalid range");
     pointer __p = this->__begin_ + (__first - begin());
     iterator __r = __make_iter(__p);
-    this->__destruct_at_end(_VSTD::move(__p + (__last - __first), this->__end_, __p));
+    if (__first != __last)
+        this->__destruct_at_end(_VSTD::move(__p + (__last - __first), this->__end_, __p));
     return __r;
 }