Page MenuHomePhabricator

[libc++] Split the various iterator types out of <iterator>
ClosedPublic

Authored by ldionne on Jun 21 2021, 1:54 PM.

Details

Diff Detail

Unit TestsFailed

TimeTest
650 mslibcxx CI C++03 > libcxx-trunk-shared.std/iterators/predef_iterators/insert_iterators/insert_iter_ops/insert_iter_cons::test.pass.cpp
Script: -- : 'COMPILED WITH'; /usr/bin/clang++ /home/libcxx-builder/.buildkite-agent/builds/1c27979e22d4-1/llvm-project/libcxx-ci/libcxx/test/std/iterators/predef.iterators/insert.iterators/insert.iter.ops/insert.iter.cons/test.pass.cpp --target=x86_64-unknown-linux-gnu -nostdinc++ -isystem /home/libcxx-builder/.buildkite-agent/builds/1c27979e22d4-1/llvm-project/libcxx-ci/build/generic-cxx03/include/c++/v1 -I /home/libcxx-builder/.buildkite-agent/builds/1c27979e22d4-1/llvm-project/libcxx-ci/libcxx/test/support -std=c++03 -Werror -Wall -Wextra -Wshadow -Wundef -Wno-unused-command-line-argument -Wno-attributes -Wno-pessimizing-move -Wno-c++11-extensions -Wno-user-defined-literals -Wno-noexcept-type -Wno-atomic-alignment -Wsign-compare -Wunused-variable -Wunused-parameter -Wunreachable-code -Wno-unused-local-typedef -D_LIBCPP_DISABLE_AVAILABILITY -fcoroutines-ts -Werror=thread-safety -Wuser-defined-warnings -fmodules-cache-path=/home/libcxx-builder/.buildkite-agent/builds/1c27979e22d4-1/llvm-project/libcxx-ci/build/generic-cxx03/projects/libcxx/std/iterators/predef.iterators/insert.iterators/insert.iter.ops/insert.iter.cons/Output/test.pass.cpp.dir/t.tmp/ModuleCache -Wno-macro-redefined -D_LIBCPP_HAS_THREAD_API_PTHREAD -Wno-macro-redefined -D_LIBCPP_ABI_VERSION=1 -lc++experimental -nostdlib++ -L /home/libcxx-builder/.buildkite-agent/builds/1c27979e22d4-1/llvm-project/libcxx-ci/build/generic-cxx03/lib -lc++ -Wl,-rpath,/home/libcxx-builder/.buildkite-agent/builds/1c27979e22d4-1/llvm-project/libcxx-ci/build/generic-cxx03/lib -pthread -o /home/libcxx-builder/.buildkite-agent/builds/1c27979e22d4-1/llvm-project/libcxx-ci/build/generic-cxx03/projects/libcxx/std/iterators/predef.iterators/insert.iterators/insert.iter.ops/insert.iter.cons/Output/test.pass.cpp.dir/t.tmp.exe
700 mslibcxx CI C++03 > libcxx-trunk-shared.std/iterators/predef_iterators/insert_iterators/insert_iter_ops/insert_iter_op++::post.pass.cpp
Script: -- : 'COMPILED WITH'; /usr/bin/clang++ /home/libcxx-builder/.buildkite-agent/builds/1c27979e22d4-1/llvm-project/libcxx-ci/libcxx/test/std/iterators/predef.iterators/insert.iterators/insert.iter.ops/insert.iter.op++/post.pass.cpp --target=x86_64-unknown-linux-gnu -nostdinc++ -isystem /home/libcxx-builder/.buildkite-agent/builds/1c27979e22d4-1/llvm-project/libcxx-ci/build/generic-cxx03/include/c++/v1 -I /home/libcxx-builder/.buildkite-agent/builds/1c27979e22d4-1/llvm-project/libcxx-ci/libcxx/test/support -std=c++03 -Werror -Wall -Wextra -Wshadow -Wundef -Wno-unused-command-line-argument -Wno-attributes -Wno-pessimizing-move -Wno-c++11-extensions -Wno-user-defined-literals -Wno-noexcept-type -Wno-atomic-alignment -Wsign-compare -Wunused-variable -Wunused-parameter -Wunreachable-code -Wno-unused-local-typedef -D_LIBCPP_DISABLE_AVAILABILITY -fcoroutines-ts -Werror=thread-safety -Wuser-defined-warnings -fmodules-cache-path=/home/libcxx-builder/.buildkite-agent/builds/1c27979e22d4-1/llvm-project/libcxx-ci/build/generic-cxx03/projects/libcxx/std/iterators/predef.iterators/insert.iterators/insert.iter.ops/insert.iter.op++/Output/post.pass.cpp.dir/t.tmp/ModuleCache -Wno-macro-redefined -D_LIBCPP_HAS_THREAD_API_PTHREAD -Wno-macro-redefined -D_LIBCPP_ABI_VERSION=1 -lc++experimental -nostdlib++ -L /home/libcxx-builder/.buildkite-agent/builds/1c27979e22d4-1/llvm-project/libcxx-ci/build/generic-cxx03/lib -lc++ -Wl,-rpath,/home/libcxx-builder/.buildkite-agent/builds/1c27979e22d4-1/llvm-project/libcxx-ci/build/generic-cxx03/lib -pthread -o /home/libcxx-builder/.buildkite-agent/builds/1c27979e22d4-1/llvm-project/libcxx-ci/build/generic-cxx03/projects/libcxx/std/iterators/predef.iterators/insert.iterators/insert.iter.ops/insert.iter.op++/Output/post.pass.cpp.dir/t.tmp.exe
710 mslibcxx CI C++03 > libcxx-trunk-shared.std/iterators/predef_iterators/insert_iterators/insert_iter_ops/insert_iter_op++::pre.pass.cpp
Script: -- : 'COMPILED WITH'; /usr/bin/clang++ /home/libcxx-builder/.buildkite-agent/builds/1c27979e22d4-1/llvm-project/libcxx-ci/libcxx/test/std/iterators/predef.iterators/insert.iterators/insert.iter.ops/insert.iter.op++/pre.pass.cpp --target=x86_64-unknown-linux-gnu -nostdinc++ -isystem /home/libcxx-builder/.buildkite-agent/builds/1c27979e22d4-1/llvm-project/libcxx-ci/build/generic-cxx03/include/c++/v1 -I /home/libcxx-builder/.buildkite-agent/builds/1c27979e22d4-1/llvm-project/libcxx-ci/libcxx/test/support -std=c++03 -Werror -Wall -Wextra -Wshadow -Wundef -Wno-unused-command-line-argument -Wno-attributes -Wno-pessimizing-move -Wno-c++11-extensions -Wno-user-defined-literals -Wno-noexcept-type -Wno-atomic-alignment -Wsign-compare -Wunused-variable -Wunused-parameter -Wunreachable-code -Wno-unused-local-typedef -D_LIBCPP_DISABLE_AVAILABILITY -fcoroutines-ts -Werror=thread-safety -Wuser-defined-warnings -fmodules-cache-path=/home/libcxx-builder/.buildkite-agent/builds/1c27979e22d4-1/llvm-project/libcxx-ci/build/generic-cxx03/projects/libcxx/std/iterators/predef.iterators/insert.iterators/insert.iter.ops/insert.iter.op++/Output/pre.pass.cpp.dir/t.tmp/ModuleCache -Wno-macro-redefined -D_LIBCPP_HAS_THREAD_API_PTHREAD -Wno-macro-redefined -D_LIBCPP_ABI_VERSION=1 -lc++experimental -nostdlib++ -L /home/libcxx-builder/.buildkite-agent/builds/1c27979e22d4-1/llvm-project/libcxx-ci/build/generic-cxx03/lib -lc++ -Wl,-rpath,/home/libcxx-builder/.buildkite-agent/builds/1c27979e22d4-1/llvm-project/libcxx-ci/build/generic-cxx03/lib -pthread -o /home/libcxx-builder/.buildkite-agent/builds/1c27979e22d4-1/llvm-project/libcxx-ci/build/generic-cxx03/projects/libcxx/std/iterators/predef.iterators/insert.iterators/insert.iter.ops/insert.iter.op++/Output/pre.pass.cpp.dir/t.tmp.exe
700 mslibcxx CI C++03 > libcxx-trunk-shared.std/iterators/predef_iterators/insert_iterators/insert_iter_ops/insert_iter_op=::lv_value.pass.cpp
Script: -- : 'COMPILED WITH'; /usr/bin/clang++ /home/libcxx-builder/.buildkite-agent/builds/1c27979e22d4-1/llvm-project/libcxx-ci/libcxx/test/std/iterators/predef.iterators/insert.iterators/insert.iter.ops/insert.iter.op=/lv_value.pass.cpp --target=x86_64-unknown-linux-gnu -nostdinc++ -isystem /home/libcxx-builder/.buildkite-agent/builds/1c27979e22d4-1/llvm-project/libcxx-ci/build/generic-cxx03/include/c++/v1 -I /home/libcxx-builder/.buildkite-agent/builds/1c27979e22d4-1/llvm-project/libcxx-ci/libcxx/test/support -std=c++03 -Werror -Wall -Wextra -Wshadow -Wundef -Wno-unused-command-line-argument -Wno-attributes -Wno-pessimizing-move -Wno-c++11-extensions -Wno-user-defined-literals -Wno-noexcept-type -Wno-atomic-alignment -Wsign-compare -Wunused-variable -Wunused-parameter -Wunreachable-code -Wno-unused-local-typedef -D_LIBCPP_DISABLE_AVAILABILITY -fcoroutines-ts -Werror=thread-safety -Wuser-defined-warnings -fmodules-cache-path=/home/libcxx-builder/.buildkite-agent/builds/1c27979e22d4-1/llvm-project/libcxx-ci/build/generic-cxx03/projects/libcxx/std/iterators/predef.iterators/insert.iterators/insert.iter.ops/insert.iter.op=/Output/lv_value.pass.cpp.dir/t.tmp/ModuleCache -Wno-macro-redefined -D_LIBCPP_HAS_THREAD_API_PTHREAD -Wno-macro-redefined -D_LIBCPP_ABI_VERSION=1 -lc++experimental -nostdlib++ -L /home/libcxx-builder/.buildkite-agent/builds/1c27979e22d4-1/llvm-project/libcxx-ci/build/generic-cxx03/lib -lc++ -Wl,-rpath,/home/libcxx-builder/.buildkite-agent/builds/1c27979e22d4-1/llvm-project/libcxx-ci/build/generic-cxx03/lib -pthread -o /home/libcxx-builder/.buildkite-agent/builds/1c27979e22d4-1/llvm-project/libcxx-ci/build/generic-cxx03/projects/libcxx/std/iterators/predef.iterators/insert.iterators/insert.iter.ops/insert.iter.op=/Output/lv_value.pass.cpp.dir/t.tmp.exe
710 mslibcxx CI C++03 > libcxx-trunk-shared.std/iterators/predef_iterators/insert_iterators/insert_iter_ops/insert_iter_op_astrk::test.pass.cpp
Script: -- : 'COMPILED WITH'; /usr/bin/clang++ /home/libcxx-builder/.buildkite-agent/builds/1c27979e22d4-1/llvm-project/libcxx-ci/libcxx/test/std/iterators/predef.iterators/insert.iterators/insert.iter.ops/insert.iter.op_astrk/test.pass.cpp --target=x86_64-unknown-linux-gnu -nostdinc++ -isystem /home/libcxx-builder/.buildkite-agent/builds/1c27979e22d4-1/llvm-project/libcxx-ci/build/generic-cxx03/include/c++/v1 -I /home/libcxx-builder/.buildkite-agent/builds/1c27979e22d4-1/llvm-project/libcxx-ci/libcxx/test/support -std=c++03 -Werror -Wall -Wextra -Wshadow -Wundef -Wno-unused-command-line-argument -Wno-attributes -Wno-pessimizing-move -Wno-c++11-extensions -Wno-user-defined-literals -Wno-noexcept-type -Wno-atomic-alignment -Wsign-compare -Wunused-variable -Wunused-parameter -Wunreachable-code -Wno-unused-local-typedef -D_LIBCPP_DISABLE_AVAILABILITY -fcoroutines-ts -Werror=thread-safety -Wuser-defined-warnings -fmodules-cache-path=/home/libcxx-builder/.buildkite-agent/builds/1c27979e22d4-1/llvm-project/libcxx-ci/build/generic-cxx03/projects/libcxx/std/iterators/predef.iterators/insert.iterators/insert.iter.ops/insert.iter.op_astrk/Output/test.pass.cpp.dir/t.tmp/ModuleCache -Wno-macro-redefined -D_LIBCPP_HAS_THREAD_API_PTHREAD -Wno-macro-redefined -D_LIBCPP_ABI_VERSION=1 -lc++experimental -nostdlib++ -L /home/libcxx-builder/.buildkite-agent/builds/1c27979e22d4-1/llvm-project/libcxx-ci/build/generic-cxx03/lib -lc++ -Wl,-rpath,/home/libcxx-builder/.buildkite-agent/builds/1c27979e22d4-1/llvm-project/libcxx-ci/build/generic-cxx03/lib -pthread -o /home/libcxx-builder/.buildkite-agent/builds/1c27979e22d4-1/llvm-project/libcxx-ci/build/generic-cxx03/projects/libcxx/std/iterators/predef.iterators/insert.iterators/insert.iter.ops/insert.iter.op_astrk/Output/test.pass.cpp.dir/t.tmp.exe
View Full Test Results (81 Failed)

Event Timeline

ldionne created this revision.Jun 21 2021, 1:54 PM
ldionne requested review of this revision.Jun 21 2021, 1:54 PM
Herald added a project: Restricted Project. · View Herald TranscriptJun 21 2021, 1:54 PM
Herald added a reviewer: Restricted Project. · View Herald Transcript
Quuxplusone added inline comments.
libcxx/include/__iterator/insert_iterator.h
10–11

/BACK_//

Quuxplusone accepted this revision as: Quuxplusone.Jun 21 2021, 2:56 PM

Sure, once buildkite is happy, I'm happy.
It would be a good idea — if you haven't already done so — to diff {i,o}stream_iterator.h, and diff {front,back}_insert_iterator.h, and so on; and try to remove any gratuitous differences in formatting or inclusions or anything.

libcxx/include/__iterator/wrap_iter.h
78–81

I suppose this is just shuffling code around, so OK; but it would make a good followup to investigate why these 4 lines are here, and what breaks if they're removed (if anything). I suspect they're obsolete.
Bonus points if you make all the operator<= etc. into hidden friends, thus shortening this file by a few dozen lines.

ldionne updated this revision to Diff 353704.Jun 22 2021, 10:37 AM
ldionne marked 2 inline comments as done.

Fix CI failures (hopefully).

libcxx/include/__iterator/wrap_iter.h
78–81

I planned on doing that, thanks for reminding me.

Those forward declarations are obsolete, I already checked that the other day.

Note: I am expecting this to fail in the Modules build because I did not add the relevant files to the modulemap. If it doesn't fail, I'll raise an eyebrow.

Note: I am expecting this to fail in the Modules build because I did not add the relevant files to the modulemap. If it doesn't fail, I'll raise an eyebrow.

The modules build doesn't fail - it's a bit suspicious, but as Arthur said in an offline conversation, it appears that those modulemap changes are only necessary when there is some sort of specialization of a type defined in another header or something like that.

ldionne updated this revision to Diff 353816.Jun 22 2021, 4:24 PM

Fix the modulemap

ldionne updated this revision to Diff 353938.Jun 23 2021, 5:53 AM

Fix typo in modulemap

ldionne updated this revision to Diff 354259.Jun 24 2021, 8:05 AM

Proper IWYU

ldionne accepted this revision.Jun 28 2021, 9:24 AM
This revision is now accepted and ready to land.Jun 28 2021, 9:24 AM