Page MenuHomePhabricator

[libc++] Fix signatures of counted_iterator::base(), transform_view::iterator::base().
ClosedPublic

Authored by Quuxplusone on Jan 14 2022, 8:47 AM.

Details

Summary

Drive-by stop calling .base() on test iterators in the test, and improve the transform_view::iterator/sentinel tests.

Diff Detail

Unit TestsFailed

TimeTest
380 mslibcxx CI C++03 > llvm-libc++-shared-cfg-in.std/iterators/predef_iterators/move_iterators/move_iter_ops/move_iter_op_const::iter.pass.cpp
Script: -- : 'COMPILED WITH'; /usr/bin/c++ /home/libcxx-builder/.buildkite-agent/builds/fc0747814845-1/llvm-project/libcxx-ci/libcxx/test/std/iterators/predef.iterators/move.iterators/move.iter.ops/move.iter.op.const/iter.pass.cpp --target=x86_64-unknown-linux-gnu -nostdinc++ -isystem /home/libcxx-builder/.buildkite-agent/builds/fc0747814845-1/llvm-project/libcxx-ci/build/generic-cxx03/include/c++/v1 -isystem /home/libcxx-builder/.buildkite-agent/builds/fc0747814845-1/llvm-project/libcxx-ci/build/generic-cxx03/include/c++/v1 -I /home/libcxx-builder/.buildkite-agent/builds/fc0747814845-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 -D_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER -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/fc0747814845-1/llvm-project/libcxx-ci/build/generic-cxx03/lib -Wl,-rpath,/home/libcxx-builder/.buildkite-agent/builds/fc0747814845-1/llvm-project/libcxx-ci/build/generic-cxx03/lib -lc++ -pthread -o /home/libcxx-builder/.buildkite-agent/builds/fc0747814845-1/llvm-project/libcxx-ci/build/generic-cxx03/std/iterators/predef.iterators/move.iterators/move.iter.ops/move.iter.op.const/Output/iter.pass.cpp.dir/t.tmp.exe
560 mslibcxx CI C++20 > llvm-libc++-shared-cfg-in.std/iterators/predef_iterators/move_iterators/move_iter_ops/move_iter_op_const::iter.pass.cpp
Script: -- : 'COMPILED WITH'; /usr/bin/c++ /home/libcxx-builder/.buildkite-agent/builds/3d4c35008a9f-1/llvm-project/libcxx-ci/libcxx/test/std/iterators/predef.iterators/move.iterators/move.iter.ops/move.iter.op.const/iter.pass.cpp --target=x86_64-unknown-linux-gnu -nostdinc++ -isystem /home/libcxx-builder/.buildkite-agent/builds/3d4c35008a9f-1/llvm-project/libcxx-ci/build/generic-cxx20/include/c++/v1 -isystem /home/libcxx-builder/.buildkite-agent/builds/3d4c35008a9f-1/llvm-project/libcxx-ci/build/generic-cxx20/include/c++/v1 -I /home/libcxx-builder/.buildkite-agent/builds/3d4c35008a9f-1/llvm-project/libcxx-ci/libcxx/test/support -std=c++20 -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 -D_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER -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/3d4c35008a9f-1/llvm-project/libcxx-ci/build/generic-cxx20/lib -Wl,-rpath,/home/libcxx-builder/.buildkite-agent/builds/3d4c35008a9f-1/llvm-project/libcxx-ci/build/generic-cxx20/lib -lc++ -pthread -o /home/libcxx-builder/.buildkite-agent/builds/3d4c35008a9f-1/llvm-project/libcxx-ci/build/generic-cxx20/std/iterators/predef.iterators/move.iterators/move.iter.ops/move.iter.op.const/Output/iter.pass.cpp.dir/t.tmp.exe
1,510 mslibcxx CI C++20 > llvm-libc++-shared-cfg-in.std/ranges/range_adaptors/range_transform::end.pass.cpp
Script: -- : 'COMPILED WITH'; /usr/bin/c++ /home/libcxx-builder/.buildkite-agent/builds/3d4c35008a9f-1/llvm-project/libcxx-ci/libcxx/test/std/ranges/range.adaptors/range.transform/end.pass.cpp --target=x86_64-unknown-linux-gnu -nostdinc++ -isystem /home/libcxx-builder/.buildkite-agent/builds/3d4c35008a9f-1/llvm-project/libcxx-ci/build/generic-cxx20/include/c++/v1 -isystem /home/libcxx-builder/.buildkite-agent/builds/3d4c35008a9f-1/llvm-project/libcxx-ci/build/generic-cxx20/include/c++/v1 -I /home/libcxx-builder/.buildkite-agent/builds/3d4c35008a9f-1/llvm-project/libcxx-ci/libcxx/test/support -std=c++20 -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 -D_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER -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/3d4c35008a9f-1/llvm-project/libcxx-ci/build/generic-cxx20/lib -Wl,-rpath,/home/libcxx-builder/.buildkite-agent/builds/3d4c35008a9f-1/llvm-project/libcxx-ci/build/generic-cxx20/lib -lc++ -pthread -o /home/libcxx-builder/.buildkite-agent/builds/3d4c35008a9f-1/llvm-project/libcxx-ci/build/generic-cxx20/std/ranges/range.adaptors/range.transform/Output/end.pass.cpp.dir/t.tmp.exe
1,390 mslibcxx CI C++20 > llvm-libc++-shared-cfg-in.std/ranges/range_adaptors/range_transform/iterator::base.pass.cpp
Script: -- : 'COMPILED WITH'; /usr/bin/c++ /home/libcxx-builder/.buildkite-agent/builds/3d4c35008a9f-1/llvm-project/libcxx-ci/libcxx/test/std/ranges/range.adaptors/range.transform/iterator/base.pass.cpp --target=x86_64-unknown-linux-gnu -nostdinc++ -isystem /home/libcxx-builder/.buildkite-agent/builds/3d4c35008a9f-1/llvm-project/libcxx-ci/build/generic-cxx20/include/c++/v1 -isystem /home/libcxx-builder/.buildkite-agent/builds/3d4c35008a9f-1/llvm-project/libcxx-ci/build/generic-cxx20/include/c++/v1 -I /home/libcxx-builder/.buildkite-agent/builds/3d4c35008a9f-1/llvm-project/libcxx-ci/libcxx/test/support -std=c++20 -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 -D_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER -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/3d4c35008a9f-1/llvm-project/libcxx-ci/build/generic-cxx20/lib -Wl,-rpath,/home/libcxx-builder/.buildkite-agent/builds/3d4c35008a9f-1/llvm-project/libcxx-ci/build/generic-cxx20/lib -lc++ -pthread -o /home/libcxx-builder/.buildkite-agent/builds/3d4c35008a9f-1/llvm-project/libcxx-ci/build/generic-cxx20/std/ranges/range.adaptors/range.transform/iterator/Output/base.pass.cpp.dir/t.tmp.exe
760 mslibcxx CI C++2b > llvm-libc++-shared-cfg-in.std/iterators/predef_iterators/move_iterators/move_iter_ops/move_iter_op_const::iter.pass.cpp
Script: -- : 'COMPILED WITH'; /usr/bin/c++ /home/libcxx-builder/.buildkite-agent/builds/01f6d7fe83a7-1/llvm-project/libcxx-ci/libcxx/test/std/iterators/predef.iterators/move.iterators/move.iter.ops/move.iter.op.const/iter.pass.cpp --target=x86_64-unknown-linux-gnu -nostdinc++ -isystem /home/libcxx-builder/.buildkite-agent/builds/01f6d7fe83a7-1/llvm-project/libcxx-ci/build/generic-cxx2b/include/c++/v1 -isystem /home/libcxx-builder/.buildkite-agent/builds/01f6d7fe83a7-1/llvm-project/libcxx-ci/build/generic-cxx2b/include/c++/v1 -I /home/libcxx-builder/.buildkite-agent/builds/01f6d7fe83a7-1/llvm-project/libcxx-ci/libcxx/test/support -std=c++2b -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 -D_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER -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/01f6d7fe83a7-1/llvm-project/libcxx-ci/build/generic-cxx2b/lib -Wl,-rpath,/home/libcxx-builder/.buildkite-agent/builds/01f6d7fe83a7-1/llvm-project/libcxx-ci/build/generic-cxx2b/lib -lc++ -pthread -o /home/libcxx-builder/.buildkite-agent/builds/01f6d7fe83a7-1/llvm-project/libcxx-ci/build/generic-cxx2b/std/iterators/predef.iterators/move.iterators/move.iter.ops/move.iter.op.const/Output/iter.pass.cpp.dir/t.tmp.exe
View Full Test Results (10 Failed)

Event Timeline

Quuxplusone requested review of this revision.Jan 14 2022, 8:47 AM
Quuxplusone created this revision.
Herald added 1 blocking reviewer(s): Restricted Project. · View Herald TranscriptJan 14 2022, 8:47 AM

LGTM, but I think we suffer from the same problem in other iterators, for example transform_view::iterator but probably others too. Any appetite for fixing all of them in this PR?

Quuxplusone edited the summary of this revision. (Show Details)

Turns out that transform_view::iterator is the only other one, that we've already implemented, that doesn't require major other changes for C++20.

move_iterator and reverse_iterator are also affected but require major changes for C++20 that we haven't implemented yet.
filter_view::iterator is affected but we haven't implemented it yet.
lazy_split_view::iterator is affected but we haven't implemented it yet.
elements_view::iterator is affected but we haven't implemented it yet.

Quuxplusone edited the summary of this revision. (Show Details)

Fix a test failure, and improve the transform_view::{iterator/sentinel} tests.

Quuxplusone retitled this revision from [libc++] counted_iterator::base() const& should be noexcept. to [libc++] Fix signatures of counted_iterator::base(), transform_view::iterator::base()..
Quuxplusone edited the summary of this revision. (Show Details)

Rebase to poke CI.

Turns out this is LWG3533; so now we can mark that issue Complete.
CI is still green.

Mordante accepted this revision as: Mordante.Jan 23 2022, 10:07 AM

Turns out this is LWG3533; so now we can mark that issue Complete.

Please add this to the commit message and mention [range.elements.iterator] has been omitted since we haven't implemented that yet.
(I expect the person implementing that to use the current wording in the Standard.)

LTGM!

This revision was not accepted when it landed; it landed in state Needs Review.Jan 26 2022, 4:43 PM
This revision was automatically updated to reflect the committed changes.