aboutsummaryrefslogtreecommitdiff
path: root/libcxx/test/std/numerics/numeric.ops
AgeCommit message (Collapse)AuthorFilesLines
2025-09-04[libc++][NFC] Use llvm.org/PR to link to bug reports (#156288)Nikolas Klauser1-1/+1
We've built up quite a few links directly to github within the code base. We should instead use `llvm.org/PR<issue-number>` to link to bugs, since that is resilient to the bug tracker changing in the future. This is especially relevant for tests linking to bugs, since they will probably be there for decades to come. A nice side effect is that these links are significantly shorter than the GH links, making them much less of an eyesore. This patch also replaces a few links that linked to the old bugzilla instance on llvm.org.
2025-07-15[libc++] Bump Xcode support (#148651)Louis Dionne5-5/+5
Libc++'s policy is to support only the latest released Xcode, which is Xcode 16.x. We did update our CI jobs to Xcode 16.x, but we forgot to update the documentation, which still mentioned Xcode 15. This patch updates the documentation and cleans up outdated mentions of apple-clang-15 in the test suite.
2025-04-05[libc++] Implement ranges::iota (#68494)James E T Smith1-0/+215
# Overview As a disclaimer, this is my first PR to LLVM and while I've tried to ensure I've followed the LLVM and libc++ contributing guidelines, there's probably a good chance I missed something. If I have, just let me know and I'll try to correct it as soon as I can. This PR implements `std::ranges::iota` and `std::ranges::out_value_result` outlined in [P2440r1](https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2021/p2440r1.html). As outlined in the paper above, I've: - Implemented `out_value_result` and added to `<algorithm>` - Added `out_value_result`, `iota_result`, and two overloads of `iota` to `std::ranges` in `<numeric>` - Updated the version macro `__cpp_lib_ranges_iota` in `<version>` I've also added tests for `ranges::iota` and `ranges::out_value_result`. Lastly, I added those structs to the appropriate module files. Partially implements #105184 EDIT: Forgot to mention in the original post, thanks to @hawkinsw for taking a look at a preliminary version of this PR! # TODOs - [x] Updating the range [status doc](https://github.com/jamesETsmith/llvm-project/blob/main/libcxx/docs/Status/RangesMajorFeatures.csv) - [x] Ensure all comments from https://reviews.llvm.org/D121436 are addressed here - [X] EDIT (I'll do this in a separate PR). ~~I'm open to implementing the rest of P2440r1 (`ranges::shift_left` and `ranges::shift_right`) if that's ok, I just wanted to get feedback on `ranges::iota` first~~ - [x] I've been having trouble building the modules locally and want to make sure that's working properly Closes: #134060
2025-03-20[libc++][test] Fix issues found by MSVC's STL (#131787)Stephan T. Lavavej1-1/+1
* libcxx/test/support/min_allocator.h + Fix `tiny_size_allocator::rebind` which mistakenly said `T` instead of `U`. * libcxx/test/std/algorithms/alg.modifying.operations/alg.partitions/stable_partition.pass.cpp + `std::stable_partition` requires bidirectional iterators. * libcxx/test/std/containers/sequences/vector.bool/max_size.pass.cpp + Fix allocator type given to `std::vector<bool>`. The element types are required to match, [N5008](https://isocpp.org/files/papers/N5008.pdf) \[container.alloc.reqmts\]/5: "*Mandates:* `allocator_type::value_type` is the same as `X::value_type`." * libcxx/test/std/time/time.clock/time.clock.utc/types.compile.pass.cpp + Mark `is_steady` as `[[maybe_unused]]`, as it appears within `LIBCPP_STATIC_ASSERT` only. * libcxx/test/std/algorithms/alg.modifying.operations/alg.rotate/rotate.pass.cpp * libcxx/test/std/algorithms/alg.modifying.operations/alg.swap/swap_ranges.pass.cpp * libcxx/test/std/utilities/utility/utility.swap/swap_array.pass.cpp + Fix MSVC warning C4127 "conditional expression is constant". `TEST_STD_AT_LEAST_23_OR_RUNTIME_EVALUATED` was introduced for this purpose, so it should be used consistently. * libcxx/test/std/numerics/numeric.ops/numeric.ops.gcd/gcd.pass.cpp + Fix `gcd()` precondition violation for `signed char`. This test case was causing `-128` to be passed as a `signed char` to `gcd()`, which is forbidden. * libcxx/test/std/containers/sequences/array/assert.iterators.pass.cpp * libcxx/test/std/containers/sequences/vector/vector.modifiers/assert.push_back.invalidation.pass.cpp * libcxx/test/std/input.output/iostream.format/print.fun/no_file_description.pass.cpp + Split some REQUIRES and XFAIL lines. This is a "nice to have" for MSVC's internal test harness, which is extremely simple and looks for exact comment matches to skip tests. We can recognize the specific lines "REQUIRES: has-unix-headers" and "XFAIL: msvc", but it's a headache to maintain if they're chained with other conditions. * libcxx/test/support/sized_allocator.h + Fix x86 truncation warnings. `std::allocator` takes `std::size_t`, so we need to `static_cast`. * libcxx/test/std/input.output/file.streams/fstreams/ifstream.members/offset_range.pass.cpp + Fix x86 truncation warning. `std::min()` is returning `std::streamoff`, which was being unnecessarily narrowed to `std::size_t`. * libcxx/test/std/algorithms/alg.sorting/alg.merge/inplace_merge_comp.pass.cpp + Fix MSVC warning C4127 "conditional expression is constant" for an always-true branch. This was very recently introduced by #129008 making `N` constexpr. As it's a local constant just nine lines above, we don't need to test whether 100 is greater than 0.
2025-03-16[libc++][numeric][NFC] Cleanup *Saturation arithmetic* tests (#101826)Hristo Hristov11-95/+96
This simplifies the tests a little bit: Fixed -> TODO(LLVM20): remove [[maybe_unused]] and `{}` scope since all supported compilers support "Placeholder variables with no name" *IMPORTANT: Requires Apple Clang with [P2169R4: A nice placeholder with no name](https://wg21.link/P2169R4)* --------- Co-authored-by: Hristo Hristov <zingam@outlook.com>
2025-03-02[libc++] Add tests for gcd that result in something other than zero or one ↵AdityaK1-1/+13
(#129395) @colincross identified gcd does not have a single case whose answer is not 0, 1, or the smaller of the two inputs.
2024-12-06[libc++] Fix sub-overflow in std::gcd implementation (#117984)serge-sans-paille1-11/+1
Fix #117249
2024-10-31[libc++] Granularize <cstddef> includes (#108696)Nikolas Klauser7-19/+14
2024-06-25[libc++] Fix incorrect overflow checking in std::lcm (#96310)Louis Dionne1-1/+26
We should have been using __builtin_mul_overflow from the start instead of adding a manual (and error-prone) check for overflow. Fixes #96196
2024-05-28[libc++] [test] Fix portability issues for MSVC (#93259)Stephan T. Lavavej1-3/+6
* Guard `std::__make_from_tuple_impl` tests with `#ifdef _LIBCPP_VERSION` and `LIBCPP_STATIC_ASSERT`. * Change `_LIBCPP_CONSTEXPR_SINCE_CXX20` to `TEST_CONSTEXPR_CXX20`. + Other functions in `variant.swap/swap.pass.cpp` were already using the proper test macro. * Mark `what` as `[[maybe_unused]]` when used by `TEST_LIBCPP_REQUIRE`. + This updates one occurrence in `libcxx/test/libcxx` for consistency. * Windows `_putenv_s()` takes 2 arguments, not 3. + See MSVC documentation: https://learn.microsoft.com/en-us/cpp/c-runtime-library/reference/putenv-s-wputenv-s?view=msvc-170 + POSIX `setenv()` takes `int overwrite`, but Windows `_putenv_s()` always overwrites. * Avoid non-Standard zero-length arrays. + Followup to #74183 and #79792. * Add `operator++()` to `unsized_it`. + The Standard requires this due to [N4981][] [move.iter.requirements]/1 "The template parameter `Iterator` shall either meet the *Cpp17InputIterator* requirements ([input.iterators]) or model `input_iterator` ([iterator.concept.input])." + MSVC's STL requires this because it has a strengthened exception specification in `move_iterator` that inspects the underlying iterator's increment operator. * `uniform_int_distribution` forbids `int8_t`/`uint8_t`. + See [N4981][] [rand.req.genl]/1.5. MSVC's STL enforces this. + Note that when changing the distribution's `IntType`, we need to be careful to preserve the original value range of `[0, max_input]`. * fstreams are constructible from `const fs::path::value_type*` on wide systems. + See [ifstream.cons], [ofstream.cons], [fstream.cons]. * In `msvc_stdlib_force_include.h`, map `_HAS_CXX23` to `TEST_STD_VER` 23 instead of 99. + On 2023-05-23, https://github.com/llvm/llvm-project/commit/71400505ca048507e827013eb1ea0bc863525cab started recognizing 23 as a distinct value. * Fix test name typo: `destory_elements.pass.cpp` => `destroy_elements.pass.cpp` [N4981]: https://wg21.link/N4981
2024-05-28[libc++] [test] Fix MSVC warnings (#93257)Stephan T. Lavavej1-4/+6
Found while running libc++'s tests with MSVC's STL. * Avoid MSVC warning C5101: use of preprocessor directive in function-like macro argument list is undefined behavior. + We can easily make this portable by extracting `const bool is_newlib`. + Followup to #73440. + See #73598. + See #73836. * Avoid MSVC warning C4267: 'return': conversion from 'size_t' to 'int', possible loss of data. + This warning is valid, but harmless for the test, so `static_cast<int>` will avoid it. * Avoid MSVC warning C4146: unary minus operator applied to unsigned type, result still unsigned. + This warning is also valid (the scenario is sometimes intentional, but surprising enough that it's worth warning about). This is a C++17 test, so we can easily avoid it by testing `is_signed_v` at compile-time before testing `m < 0` and `n < 0` at run-time. * Silence MSVC warning C4310: cast truncates constant value. + These warnings are being emitted by `T(255)`. Disabling the warning is simpler than attempting to restructure the code. + Followup to #79791. * MSVC no longer emits warning C4521: multiple copy constructors specified. + This warning was removed from the compiler, since at least 2021-12-09.
2024-05-22[libc++][pstl] Improve exception handling (#88998)Louis Dionne3-0/+266
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.
2024-05-08[libc++] Implement std::gcd using the binary version (#77747)serge-sans-paille1-1/+88
The binary version is four times faster than current implementation in my setup, and generally considered a better implementation. Code inspired by https://en.algorithmica.org/hpc/algorithms/gcd/ which itself is inspired by https://lemire.me/blog/2013/12/26/fastest-way-to-compute-the-greatest-common-divisor/ Fix #77648
2024-04-30[libc++] Some tests are missing include for `numeric_limits` (#90345)Alex Guteniev1-0/+1
Noticed while attempting microsoft/STL#4634
2024-03-27[libc++] Fix one case in saturate_cast.pass.cpp for 64-bit on z/OS (#86724)zibi21-1/+1
On z/OS int128 is disabled causing one of the cases in `saturate_cast.pass.cpp` to fail. The failure is only in 64-bit mode. In this case `the std::numeric_limits<long long int>::max()` is within `std::numeric_limits<unsigned long int>::min()` and `std::numeric_limits<unsigned long int>::max()` therefore, saturate_cast<unsigned long int>( sBigMax) == LONG_MAX and not ULONG_MAX as original test. In 32-bit, `saturate_cast<unsigned long int>( sBigMax) == ULONG_MAX` like on other platforms where int128 is enabled. This PR is required to pass this test case on z/OS and possibly on other platforms where int128 is not supported/enabled. --------- Co-authored-by: Sean Perry <perry@ca.ibm.com>
2024-01-29[libc++][test] Silence MSVC warnings (#79791)Stephan T. Lavavej1-0/+5
* `libcxx/test/std/algorithms/alg.nonmodifying/alg.find/find.pass.cpp` emits a bunch of warnings, all caused by what appears to be intentional code: + Silence MSVC warning C4245: conversion from `'int'` to `'wchar_t'`, signed/unsigned mismatch - Caused by: `test<U>(0, -1);` + Silence MSVC warning C4305: 'argument': truncation from `'int'` to `'bool'` - Caused by: `test<U>(0, -1);` + Silence MSVC warning C4310: cast truncates constant value - Caused by: `test<U>(T(-129), U(-129));` + Silence MSVC warning C4805: `'=='`: unsafe mix of type `'char'` and type `'bool'` in operation - Caused by: `bool expect_match = val == to_find;` * `libcxx/test/std/algorithms/alg.nonmodifying/alg.fold/left_folds.pass.cpp` + Silence MSVC warning C4244: 'argument': conversion from `'double'` to `'const int'`, possible loss of data - Caused by `[](int const x, double const y) { return x + y; }` deliberately being given `double`s to truncate. * `libcxx/test/std/numerics/numeric.ops/numeric.ops.midpoint/midpoint.pointer.pass.cpp` + Silence MSVC warnings about C++20 deprecated `volatile`. - Caused by: `runtime_test< volatile T>();`
2024-01-22[libc++][numeric] P0543R3: Saturation arithmetic (#77967)Hristo Hristov11-0/+1546
Implements: https://wg21.link/P0543R3 - https://eel.is/c++draft/numeric.sat Additional references: - Division: https://eel.is/c++draft/expr.mul#4 - Arithmetic conversions: https://eel.is/c++draft/expr.arith.conv#1 - Clang builtins: https://clang.llvm.org/docs/LanguageExtensions.html#builtin-functions Depends on: https://github.com/llvm/llvm-project/pull/78086 --------- Co-authored-by: Zingam <zingam@outlook.com> Co-authored-by: Mark de Wever <zar-rpg@xs4all.nl>
2023-12-20[libc++] Fix ability to explicitly instantiate std::midpoint (#74217)Sanjay Marreddi1-0/+6
std::midpoint is specified by having a pointer overload in [numeric.ops.midpoint]. With the way the pointer overload is specified, users can expect that calling std::midpoint as `std::midpoint<T>(a, b)` should work, but it didn't in libc++ due to the way the pointer overload was specified. Fixes #67046
2023-07-03[libc++] Move all the remaining .fail.cpp tests to .verify.cppLouis Dionne1-0/+0
I made sure they all had some expected-error output in them. Many of these tests would be better implemented as a positive test using SFINAE, but this is beyond the scope of this patch. Differential Revision: https://reviews.llvm.org/D153980
2023-07-01[libc++] Enables constexpr string tests.Mark de Wever4-72/+8
These tests were disabled during constant evaluation in D90569. At that time constexpr string was not implemented. It now is. Reviewed By: #libc, philnik Differential Revision: https://reviews.llvm.org/D154227
2023-03-22[libc++] Qualifies ptrdiff_t and max_align_t.Mark de Wever1-1/+1
This has been done using the following commands find libcxx/test -type f -exec perl -pi -e 's|^([^/]+?)((?<!::)ptrdiff_t)|\1std::\2|' \{} \; find libcxx/test -type f -exec perl -pi -e 's|^([^/]+?)((?<!::)max_align_t)|\1std::\2|' \{} \; The std module doesn't export declarations in the global namespaace., This is a preparation for that module. Reviewed By: #libc, ldionne Differential Revision: https://reviews.llvm.org/D146550
2023-03-21[libc++] Qualifies size_t.Mark de Wever9-86/+86
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
2023-03-14[libc++] Qualifies uint32_t and friends.Mark de Wever1-7/+7
This has been done using the following command find libcxx/test -type f -exec perl -pi -e 's|^([^/]+?)((?<!::)(?<!::u)u?int(_[a-z]+)?[0-9]{1,2}_t)|\1std::\2|' \{} \; And manually removed some false positives in std/depr/depr.c.headers. Reviewed By: ldionne, #libc Differential Revision: https://reviews.llvm.org/D145880
2023-03-08[libc++][test] Uses qualified std::uint32_t.Mark de Wever1-1/+2
The module std does not provide c-types in the global namespace. This means all these types need to be fully qualified. This is a first step to convert them by using sed. Since this is an automated conversion other types like uint64_t are kept as is. Note that tests in the directory libcxx/test/std/depr/depr.c.headers should not be converted automatically. This requires manual attention, there some test require testing uint32_t in the global namespace. These test should fail when using the std module, and pass when using the std.compat module. A similar issue occurs with atomic, atomic_uint32_t is specified as using atomic_uint32_t = atomic<uint32_t>; // freestanding So here too we need to keep the name in the global namespace in the tests. Reviewed By: ldionne, #libc Differential Revision: https://reviews.llvm.org/D145520
2022-12-23[libc++] Granularize <type_traits> includes in <compare>Nikolas Klauser1-0/+1
Reviewed By: Mordante, #libc Spies: libcxx-commits Differential Revision: https://reviews.llvm.org/D140480
2022-08-23[libc++] Extend check for non-ASCII characters to src/, test/ and benchmarks/Louis Dionne5-34/+34
Differential Revision: https://reviews.llvm.org/D132180
2022-06-14[NFC][libcxx] Check def of __LONG_DOUBLE_IEEE128__David Tenty1-3/+2
Follow on to https://reviews.llvm.org/D108352, also check for the definition of __LONG_DOUBLE_128__ before using it (because AIX doesn't enable it by default). Reviewed By: xingxue Differential Revision: https://reviews.llvm.org/D127002
2022-05-28[libc++] Remove unused __functional includesNikolas Klauser1-0/+1
Reviewed By: ldionne, #libc Spies: arichardson, smeenai, libcxx-commits, arphaman Differential Revision: https://reviews.llvm.org/D126098
2022-02-04[libc++][NFC] Use cpp17_output_iterator in tests.Mark de Wever4-20/+20
The renames the output_iterator to cpp17_output_iterator. These iterators are still used in C++20 so it's not possible to change the current type to the new C++20 requirements. This is done in a similar fashion as the cpp17_input_iterator. Reviewed By: #libc, Quuxplusone, ldionne Differential Revision: https://reviews.llvm.org/D117950
2022-01-27[libc++][nfc] Add TEST_HAS_NO_INT128.Mark de Wever1-1/+1
Avoid using the libc++ internal `_LIBCPP_HAS_NO_INT128` in our tests. Reviewed By: #libc, ldionne Differential Revision: https://reviews.llvm.org/D117992
2022-01-13[libc++][NFC] Fix placement of some XFAILsLouis Dionne1-0/+2
2021-11-08[libc++][CI] Add AIX pipeline configDavid Tenty1-0/+1
This changes adds the pipeline config for both 32-bit and 64-bit AIX targets. As well, we add a lit feature `LIBCXX-AIX-FIXME` which is used to mark the failing tests which remain to be investigated on AIX, so that the CI produces a clean build. Reviewed By: #libc, ldionne Differential Revision: https://reviews.llvm.org/D111359
2021-08-20[libc++] Remove test-suite annotations for unsupported Clang versionsLouis Dionne23-29/+12
Differential Revision: https://reviews.llvm.org/D108471
2021-08-20[libc++][PowerPC] Fix a test case failure when compiled with libcxxAlbion Fung1-1/+1
The test case is not ran unless libcxx is used, and a macro may be undefined. This patch checks for the definition of the macro before using it. Fixes http://llvm.org/PR51430 Differential Revision: https://reviews.llvm.org/D108352
2021-08-12[libc++] Remove Lit annotations for unsupported GCC versions from the test suiteLouis Dionne23-23/+0
Since we officially don't support several older compilers now, we can drop a lot of the markup in the test suite. This helps keep the test suite simple and makes sure that UNSUPPORTED annotations don't rot. This is the first patch of a series that will remove annotations for compilers that are now unsupported. Differential Revision: https://reviews.llvm.org/D107787
2021-05-02[libcxx][nfc] prefixes test type `input_iterator` with `cpp17_`Christopher Di Bella22-66/+66
C++20 revised the definition of what it means to be an iterator. While all _Cpp17InputIterators_ satisfy `std::input_iterator`, the reverse isn't true. D100271 introduces a new test adaptor to accommodate this new definition (`cpp20_input_iterator`). In order to help readers immediately distinguish which input iterator adaptor is _Cpp17InputIterator_, the current `input_iterator` adaptor has been prefixed with `cpp17_`. Differential Revision: https://reviews.llvm.org/D101242
2021-04-21[libc++] [test] Remove epicyclic workarounds for vector/span; use T[] or ↵Arthur O'Dwyer8-354/+126
std::array. Simplify the test code, and drive-by also test that these algorithms return the right iterator as their return value. Differential Revision: https://reviews.llvm.org/D100876
2020-11-28[libc++] Disable some tests using gcc 9.Mark de Wever23-0/+23
This should fix running the libc++ unit tests. They failed due to the changes introduced in 67c88e.
2020-11-28[libc++] P1645 constexpr for <numeric>Mark de Wever23-212/+797
Implements P1645: constexpr for <numeric> algorithms Reviewed By: ldionne, #libc Differential Revision: https://reviews.llvm.org/D90569
2020-11-27[libc++] Use std::move in numeric algorithms (P0616R0).zoecarver4-4/+222
This patch updates algorithms in <numeric> to use std::move based on p0616r0. Moving values instead of copying them creates huge speed improvements (see the paper for details). Differential Revision: https://reviews.llvm.org/D61170
2020-11-25Revert "[libc++] P1645 constexpr for <numeric>"Mark de Wever23-699/+198
This reverts commit eb9b063539c34d0d4dd14e8516eeb77bb8b9e4bd. The commit fails to build on build bots using LLVM 8.
2020-11-25[libc++] P1645 constexpr for <numeric>Mark de Wever23-198/+699
Implements P1645: constexpr for <numeric> algorithms Reviewed By: ldionne, #libc Differential Revision: https://reviews.llvm.org/D90569
2020-10-28[libc++] Refactor tests to remove uses of std::rand()Louis Dionne2-6/+4
This allows running these tests on systems that do not support std::rand().
2020-10-13[libc++/abi] Clean up uses of <iostream> in the test suiteLouis Dionne3-5/+0
We used <iostream> in several places where we don't actually need the full power of <iostream>, and where using basic `std::printf` is enough. This is better, since `std::printf` can be supported on systems that don't have a notion of locales, while <iostream> can't.
2020-06-03[libc++] Remove the c++98 Lit feature from the test suiteLouis Dionne32-32/+32
C++98 and C++03 are effectively aliases as far as Clang is concerned. As such, allowing both std=c++98 and std=c++03 as Lit parameters is just slightly confusing, but provides no value. It's similar to allowing both std=c++17 and std=c++1z, which we don't do. This was discovered because we had an internal bot that ran the test suite under both c++98 AND c++03 -- one of which is redundant. Differential Revision: https://reviews.llvm.org/D80926
2020-04-15[libc++] Remove workaround for .fail.cpp tests that don't have clang-verify ↵Louis Dionne12-0/+0
markup By renaming .fail.cpp tests that don't need clang-verify to .compile.fail.cpp, the new test format will not try to compile these tests with clang-verify, and the old test format will work just the same. However, this allows removing a workaround that requires parsing each test looking for clang-verify markup. After this change, a .fail.cpp test should always have clang-verify markup. When clang-verify is not supported by the compiler, we will just check that these tests fail to compile. When clang-verify is supported, these tests will be compiled with clang-verify whether they have markup or not (so they should have markup, or they will fail). This simplifies the test suite and also ensures that all of our .fail.cpp tests provide clang-verify markup. If it's impossible for a test to have clang-verify markup, it can be moved to a .compile.fail.cpp test, which are unconditionally just checked for compilation failure.
2019-10-23[NFC] Strip trailing whitespace from libc++Louis Dionne2-5/+5
2019-10-09[libc++][test] Miscellaneous MSVC cleanupsCasey Carter1-3/+3
* Silence unused-local-typedef warnings: `map.cons/assign_initializer_list.pass.cpp` (and the `set.cons` variant) uses a local typedef only within `LIBCPP_ASSERT`s, so clang diagnoses it as unused when testing non-libc++. * Add missing include: `c.math/abs.pass.cpp` uses `std::numeric_limits` but failed to `#include <limits>`. * Don't test non-type: A "recent" change to `meta.trans.other/underlying_type.pass.cpp` unconditionally tests the type `F` which is conditionally defined. * Use `hash<long long>` instead of `hash<short>` with `int` in `unordered_meow` deduction guide tests to avoid truncation warnings. * Convert `3.14` explicitly in `midpoint.float.pass` since MSVC incorrectly diagnoses `float meow = 3.14;` as truncating. Differential Revision: https://reviews.llvm.org/D68681 llvm-svn: 374248
2019-06-18Disable the 'nextafter' portions of these tests on PPC when using 128-bit ↵Marshall Clow1-19/+27
doubles because the 'nextafter' call doesn't work right. Reviewed as https://reviews.llvm.org/D62384. Thanks to Xing Xue for the patch, and Hubert for the explanation. llvm-svn: 363740
2019-06-18Fix the floating point version of midpoint. It wasn't constexpr, among other ↵Marshall Clow1-5/+16
things. Add more tests. As a drive-by, the LCD implementation had a class named '__abs' which did a 'absolute value to a common-type' conversion. Rename that to be '__ct_abs'. llvm-svn: 363714