diff options
| author | Casey Carter <Casey@Carter.net> | 2019-10-09 22:19:17 +0000 |
|---|---|---|
| committer | Casey Carter <Casey@Carter.net> | 2019-10-09 22:19:17 +0000 |
| commit | b2e3c83b0d64a7ac5c3da5829b4cc0374674f5d1 (patch) | |
| tree | 14feb9735f789ddcde0f0846d088b503e5263bd3 /libcxx/test/std/utilities | |
| parent | dc9276b7d72342b4ddd8fff04ec8933dcdf375d4 (diff) | |
| download | bcm5719-llvm-b2e3c83b0d64a7ac5c3da5829b4cc0374674f5d1.tar.gz bcm5719-llvm-b2e3c83b0d64a7ac5c3da5829b4cc0374674f5d1.zip | |
[libc++][test] Miscellaneous MSVC cleanups
* 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
Diffstat (limited to 'libcxx/test/std/utilities')
| -rw-r--r-- | libcxx/test/std/utilities/meta/meta.trans/meta.trans.other/underlying_type.pass.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/libcxx/test/std/utilities/meta/meta.trans/meta.trans.other/underlying_type.pass.cpp b/libcxx/test/std/utilities/meta/meta.trans/meta.trans.other/underlying_type.pass.cpp index fbbab50049d..3e08855d6ad 100644 --- a/libcxx/test/std/utilities/meta/meta.trans/meta.trans.other/underlying_type.pass.cpp +++ b/libcxx/test/std/utilities/meta/meta.trans/meta.trans.other/underlying_type.pass.cpp @@ -42,7 +42,7 @@ void check() ASSERT_SAME_TYPE(Expected, typename std::underlying_type<T>::type); #if TEST_STD_VER > 11 ASSERT_SAME_TYPE(Expected, typename std::underlying_type_t<T>); -#endif +#endif } enum E { V = INT_MIN }; @@ -79,7 +79,9 @@ int main(int, char**) // SFINAE-able underlying_type #if TEST_STD_VER > 17 static_assert( has_type_member<E>::value, ""); +#ifdef TEST_UNSIGNED_UNDERLYING_TYPE static_assert( has_type_member<F>::value, ""); +#endif // TEST_UNSIGNED_UNDERLYING_TYPE static_assert( has_type_member<G>::value, ""); static_assert(!has_type_member<void>::value, ""); |

