diff options
author | Lang Hames <lhames@gmail.com> | 2019-11-13 09:13:03 -0800 |
---|---|---|
committer | Lang Hames <lhames@gmail.com> | 2019-11-14 08:10:59 -0800 |
commit | 058bc4c8d48a1f3644845f4795832391bc5eb9de (patch) | |
tree | f8fa2ef01abfa5bee5feeea168a74ad6c7c65494 /llvm/unittests/ADT/IteratorTest.cpp | |
parent | 23022b93293676890b2c707616aaa8327f0e3708 (diff) | |
download | bcm5719-llvm-058bc4c8d48a1f3644845f4795832391bc5eb9de.tar.gz bcm5719-llvm-058bc4c8d48a1f3644845f4795832391bc5eb9de.zip |
[ADT] Move drop_begin from iterator_range.h into STLExtras.
Summary:
drop_begin depends on adl_begin/adl_end, which are defined in STLExtras.h,
but we can't just #include STLExtras.h in iterator_range.h as that would
introduce a circular reference (STLExtras.h already depends on
iterator_range.h). The simplest solution is to move drop_begin into
STLExtras.h, which is a reasonable home for it anyway.
Reviewers: dblaikie
Subscribers: dexonsmith, ributzka, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D70189
Diffstat (limited to 'llvm/unittests/ADT/IteratorTest.cpp')
-rw-r--r-- | llvm/unittests/ADT/IteratorTest.cpp | 13 |
1 files changed, 0 insertions, 13 deletions
diff --git a/llvm/unittests/ADT/IteratorTest.cpp b/llvm/unittests/ADT/IteratorTest.cpp index 73fd15e90e9..de74811321a 100644 --- a/llvm/unittests/ADT/IteratorTest.cpp +++ b/llvm/unittests/ADT/IteratorTest.cpp @@ -449,17 +449,4 @@ TEST(RangeTest, Distance) { 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 |