| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
[libc++] P2770R0: Stashing stashing iterators for proper flattening (#66033) - Partially implements P2770R0 (http://wg21.link/p2770) - Fixes https://wg21.link/LWG3698, https://wg21.link/LWG3700, and https://wg21.link/LWG3791 - join_with_view hasn't been done yet since this type isn't implemented yet - Rename tuple test directory to match the standard (which changed in P2770R0) - Rename join_view test directory to match the standard | 2 年前 | |
[libc++][pstl] Improve exception handling (#88998) There were various places where we incorrectly handled exceptions in the PSTL. Typical issues were missing noexcept and taking iterators by value instead of by reference. This patch fixes those inconsistent and incorrect instances, and adds proper tests for all of those. Note that the previous tests were often incorrectly turned into no-ops by the compiler due to copy ellision, which doesn't happen with these new tests. | 2 年前 | |
[libc++][PSTL] Implement std::generate{,_n} Reviewed By: #libc, ldionne Spies: ldionne, libcxx-commits Differential Revision: https://reviews.llvm.org/D152581 | 3 年前 | |
[libc++][pstl] Improve exception handling (#88998) There were various places where we incorrectly handled exceptions in the PSTL. Typical issues were missing noexcept and taking iterators by value instead of by reference. This patch fixes those inconsistent and incorrect instances, and adds proper tests for all of those. Note that the previous tests were often incorrectly turned into no-ops by the compiler due to copy ellision, which doesn't happen with these new tests. | 2 年前 | |
[libcxx][test] std::array::iterator are not pointers by C++ standard (#70729) This is to modify a list of libcxx tests written under the assumption that iterators for std::array, std::string_view, and std::string are pointers. The motivation for this PR is to make the tests more universal and potentially being used to test other C++ standard library implementations, for example [microsoft/STL](https://github.com/microsoft/STL). I can confirm that this patch makes a number of tests compatible with microsoft STL: Failed : 204 (2.12%) -> Failed : 136 (1.42%) , and does not break any tests on libcxx. This is not a complete list of such incompatibilities, but I am hoping this will start a discussion about whether we are open to accepting such changes. | 2 年前 | |
[libcxx][test] std::array::iterator are not pointers by C++ standard (#70729) This is to modify a list of libcxx tests written under the assumption that iterators for std::array, std::string_view, and std::string are pointers. The motivation for this PR is to make the tests more universal and potentially being used to test other C++ standard library implementations, for example [microsoft/STL](https://github.com/microsoft/STL). I can confirm that this patch makes a number of tests compatible with microsoft STL: Failed : 204 (2.12%) -> Failed : 136 (1.42%) , and does not break any tests on libcxx. This is not a complete list of such incompatibilities, but I am hoping this will start a discussion about whether we are open to accepting such changes. | 2 年前 | |
[libc++][test] Avoid non-Standard zero-length arrays (#74183) Found while running libc++'s test suite with MSVC's STL, where we use both MSVC's compiler and Clang/LLVM. MSVC's compiler rejects the non-Standard extension of zero-length arrays. For conformance, I'm changing these occurrences to std::array<int, 0>. Many of these files already had #include <array>; I'm adding it to the rest. I wanted to add -Wzero-length-array to libcxx/utils/libcxx/test/params.py to prevent future occurrences, but it complained about product code :crying_cat_face: : In file included from /home/runner/_work/llvm-project/llvm-project/libcxx/test/std/input.output/iostream.format/input.streams/istream.formatted/istream.formatted.arithmetic/long.pass.cpp:18: In file included from /home/runner/_work/llvm-project/llvm-project/build/generic-cxx03/include/c++/v1/istream:170: In file included from /home/runner/_work/llvm-project/llvm-project/build/generic-cxx03/include/c++/v1/ostream:172: In file included from /home/runner/_work/llvm-project/llvm-project/build/generic-cxx03/include/c++/v1/__system_error/error_code.h:18: In file included from /home/runner/_work/llvm-project/llvm-project/build/generic-cxx03/include/c++/v1/__system_error/error_category.h:15: /home/runner/_work/llvm-project/llvm-project/build/generic-cxx03/include/c++/v1/string:811:25: error: zero size arrays are an extension [-Werror,-Wzero-length-array] 811 | char __padding_[sizeof(value_type) - 1]; | ^~~~~~~~~~~~~~~~~~~~~~ /home/runner/_work/llvm-project/llvm-project/build/generic-cxx03/include/c++/v1/string:817:19: note: in instantiation of member class 'std::basic_string<char>::__short' requested here 817 | static_assert(sizeof(__short) == (sizeof(value_type) * (__min_cap + 1)), "__short has an unexpected size."); | ^ /home/runner/_work/llvm-project/llvm-project/build/generic-cxx03/include/c++/v1/string:2069:5: note: in instantiation of template class 'std::basic_string<char>' requested here 2069 | _LIBCPP_STRING_V1_EXTERN_TEMPLATE_LIST(_LIBCPP_DECLARE, char) | ^ /home/runner/_work/llvm-project/llvm-project/build/generic-cxx03/include/c++/v1/__string/extern_template_lists.h:31:60: note: expanded from macro '_LIBCPP_STRING_V1_EXTERN_TEMPLATE_LIST' 31 | _Func(_LIBCPP_EXPORTED_FROM_ABI basic_string<_CharType>& basic_string<_CharType>::replace(size_type, size_type, value_type const*, size_type)) \ | ^ I pushed a tiny commit to fix unrelated comment typos, in an attempt to clear out spurious CI failures. | 2 年前 | |
[libc++][test] Cleanup typos and unnecessary semicolons (#73435) I've structured this into a series of commits for even easier reviewing, if that helps. I could easily split this up into separate PRs if desired, but as this is low-risk with simple edits, I thought one PR would be easiest. * Drop unnecessary semicolons after function definitions. * Cleanup comment typos. * Cleanup static_assert typos. * Cleanup test code typos. + There should be no functional changes, assuming I've changed all occurrences. * ~~Fix massive test code typos.~~ + This was a real problem, but needed more surgery. I reverted those changes here, and @philnik777 is fixing this properly with #73444. * clang-formatting as requested by the CI. | 2 年前 | |
[libc++][pstl] Improve exception handling (#88998) There were various places where we incorrectly handled exceptions in the PSTL. Typical issues were missing noexcept and taking iterators by value instead of by reference. This patch fixes those inconsistent and incorrect instances, and adds proper tests for all of those. Note that the previous tests were often incorrectly turned into no-ops by the compiler due to copy ellision, which doesn't happen with these new tests. | 2 年前 | |
[libc++] Qualifies size_t. This has been done using the following command find libcxx/test -type f -exec perl -pi -e 's|^([^/]+?)((?<!::)size_t)|\1std::\2|' \{} \; And manually removed some false positives in std/depr/depr.c.headers. The std module doesn't export ::size_t, this is a preparation for that module. Reviewed By: ldionne, #libc, EricWF, philnik Differential Revision: https://reviews.llvm.org/D146088 | 3 年前 | |
[libc++][pstl] Improve exception handling (#88998) There were various places where we incorrectly handled exceptions in the PSTL. Typical issues were missing noexcept and taking iterators by value instead of by reference. This patch fixes those inconsistent and incorrect instances, and adds proper tests for all of those. Note that the previous tests were often incorrectly turned into no-ops by the compiler due to copy ellision, which doesn't happen with these new tests. | 2 年前 | |
[libc++] Implement [P0769] "Add shift to algorithm" (shift_left, shift_right) I believe this is a complete implementation of std::shift_left and std::shift_right from http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2018/p0769r2.pdf Some test cases copied-with-modification from D60027. Differential Revision: https://reviews.llvm.org/D93819 | 5 年前 | |
[libcxx][test] std::array::iterator are not pointers by C++ standard (#70729) This is to modify a list of libcxx tests written under the assumption that iterators for std::array, std::string_view, and std::string are pointers. The motivation for this PR is to make the tests more universal and potentially being used to test other C++ standard library implementations, for example [microsoft/STL](https://github.com/microsoft/STL). I can confirm that this patch makes a number of tests compatible with microsoft STL: Failed : 204 (2.12%) -> Failed : 136 (1.42%) , and does not break any tests on libcxx. This is not a complete list of such incompatibilities, but I am hoping this will start a discussion about whether we are open to accepting such changes. | 2 年前 | |
[libc++][pstl] Improve exception handling (#88998) There were various places where we incorrectly handled exceptions in the PSTL. Typical issues were missing noexcept and taking iterators by value instead of by reference. This patch fixes those inconsistent and incorrect instances, and adds proper tests for all of those. Note that the previous tests were often incorrectly turned into no-ops by the compiler due to copy ellision, which doesn't happen with these new tests. | 2 年前 | |
[libc++][test] Fix MSVC warnings with static_casts (#74962) Found while running libc++'s tests with MSVC's STL. * libcxx/test/std/algorithms/alg.modifying.operations/alg.unique/ranges_unique_copy.pass.cpp + Fix MSVC "warning C4389: '==': signed/unsigned mismatch". + This was x86-specific for me. The LHS is int and the RHS is size_t. We know the array's size, so static_cast<int> is certainly safe, and this matches the following numberOfProj comparisons. * libcxx/test/std/containers/sequences/insert_range_sequence_containers.h + Fix MSVC "warning C4267: 'argument': conversion from 'size_t' to 'const int', possible loss of data". + test_case.index is size_t: https://github.com/llvm/llvm-project/blob/b85f1f9b182234ba366d78ae2174a149e44d08c1/libcxx/test/std/containers/insert_range_helpers.h#L65-L68 + But the container's difference_type is int: https://github.com/llvm/llvm-project/blob/b85f1f9b182234ba366d78ae2174a149e44d08c1/libcxx/test/support/test_allocator.h#L65-L76 + I introduced an alias D to make the long line more readable. * libcxx/test/std/containers/unord/unord.map/eq.different_hash.pass.cpp * libcxx/test/std/containers/unord/unord.multimap/eq.different_hash.pass.cpp * libcxx/test/std/containers/unord/unord.multiset/eq.different_hash.pass.cpp * libcxx/test/std/containers/unord/unord.set/eq.different_hash.pass.cpp + Fix MSVC "warning C6297: Arithmetic overflow. Results might not be an expected value." + This warning is almost annoying enough to outright disable, but we use similar static_casts to deal with sign/truncation warnings elsewhere, because there's some value in ensuring that product code is clean with respect to these warnings. If there were many more occurrences, then disabling the warning would be appropriate. + Cleanup: Change 2 inconsistently unqualified occurrences of size_t to std::size_t. * libcxx/test/std/containers/views/mdspan/layout_stride/index_operator.pass.cpp + Fix MSVC "warning C4244: 'initializing': conversion from '__int64' to 'size_t', possible loss of data". + This was x86-specific for me. The args are indeed int64_t, and we're storing the result in size_t, so we should cast. * libcxx/test/std/ranges/range.utility/range.utility.conv/container.h + Fix MSVC "warning C4244: 'initializing': conversion from 'ptrdiff_t' to 'int', possible loss of data". + Fix MSVC "warning C4267: 'initializing': conversion from 'size_t' to 'int', possible loss of data". + We're initializing int size_, so we should explicitly cast from pointer subtraction and std::ranges::size. * libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.create/allocate_shared_for_overwrite.pass.cpp * libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.create/make_shared_for_overwrite.pass.cpp * libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.create/make_unique_for_overwrite.default_init.pass.cpp + Fix MSVC "warning C4309: 'initializing': truncation of constant value". + MSVC emits this warning because 0xDE is outside the range of char (signed by default in our implementation). * libcxx/test/support/concat_macros.h + Fix MSVC "warning C4244: 'argument': conversion from 'char16_t' to 'const char', possible loss of data". + Fix MSVC "warning C4244: 'argument': conversion from 'unsigned int' to 'const char', possible loss of data". + This code was very recently introduced by @mordante in #73395. | 2 年前 |
| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
| 2 年前 | ||
| 2 年前 | ||
| 3 年前 | ||
| 2 年前 | ||
| 2 年前 | ||
| 2 年前 | ||
| 2 年前 | ||
| 2 年前 | ||
| 2 年前 | ||
| 3 年前 | ||
| 2 年前 | ||
| 5 年前 | ||
| 2 年前 | ||
| 2 年前 | ||
| 2 年前 |