Index: llvm/trunk/include/llvm/ADT/iterator_range.h
===================================================================
--- llvm/trunk/include/llvm/ADT/iterator_range.h
+++ llvm/trunk/include/llvm/ADT/iterator_range.h
@@ -59,9 +59,10 @@
   return iterator_range<T>(std::move(p.first), std::move(p.second));
 }
 
-template<typename T>
-iterator_range<decltype(begin(std::declval<T>()))> drop_begin(T &&t, int n) {
-  return make_range(std::next(begin(t), n), end(t));
+template <typename T>
+iterator_range<decltype(adl_begin(std::declval<T>()))> drop_begin(T &&t,
+                                                                  int n) {
+  return make_range(std::next(adl_begin(t), n), adl_end(t));
 }
 }
 
Index: llvm/trunk/unittests/ADT/IteratorTest.cpp
===================================================================
--- llvm/trunk/unittests/ADT/IteratorTest.cpp
+++ llvm/trunk/unittests/ADT/IteratorTest.cpp
@@ -387,4 +387,17 @@
   EXPECT_EQ(std::distance(v2.begin(), v2.end()), size(v2));
 }
 
+TEST(IteratorRangeTest, DropBegin) {
+  SmallVector<int, 5> vec{0, 1, 2, 3, 4};
+
+  for (int n = 0; n < 5; ++n) {
+    int i = n;
+    for (auto &v : drop_begin(vec, n)) {
+      EXPECT_EQ(v, i);
+      i += 1;
+    }
+    EXPECT_EQ(i, 5);
+  }
+}
+
 } // anonymous namespace