From c2c6c1de6b776e7a0f3d14f6d43a03cbefc04645 Mon Sep 17 00:00:00 2001 From: Eric Fiselier Date: Thu, 15 Nov 2018 00:11:02 +0000 Subject: [PATCH] Get tests compiling with -Wunused-local-typedef git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@346914 91177308-0d34-0410-b5e6-96231b3b80d8 --- .../depr.adaptors.cxx1z.pass.cpp | 22 ++++++++++++++++--- .../construct_piecewise_pair.pass.cpp | 7 ------ .../db_deallocate.pass.cpp | 2 +- .../thread.thread.this/sleep_for.pass.cpp | 1 - .../map/map.access/index_key.pass.cpp | 1 - .../map/map.access/index_rv_key.pass.cpp | 1 - .../queue/queue.defn/emplace.pass.cpp | 2 +- .../stack/stack.defn/emplace.pass.cpp | 2 +- ...map_allocator_requirement_test_templates.h | 8 ------- .../resize_size_value.pass.cpp | 1 - .../list/list.cons/input_iterator.pass.cpp | 4 ---- .../vector.cons/construct_iter_iter.pass.cpp | 2 -- .../construct_iter_iter_alloc.pass.cpp | 2 -- ...set_allocator_requirement_test_templates.h | 8 ------- .../unord.map/unord.map.elem/index.pass.cpp | 1 - .../increment.pass.cpp | 1 - .../begin_end.pass.cpp | 1 - .../rec.dir.itr.members/increment.pass.cpp | 1 - .../rec.dir.itr.nonmembers/begin_end.pass.cpp | 1 - .../last_write_time.pass.cpp | 7 ------ .../meta/meta.type.synop/endian.pass.cpp | 1 - .../time.cal.md.members/day.pass.cpp | 1 - .../year_month_day.pass.cpp | 1 - .../year_month_day_last.pass.cpp | 4 ---- .../year_month_weekday_last.pass.cpp | 1 - .../time.cal.year.members/plus_minus.pass.cpp | 1 - .../time.cal.ymdlast.members/ctor.pass.cpp | 1 - .../time.cal.ymdlast.members/month.pass.cpp | 1 - .../month_day_last.pass.cpp | 1 - .../time.cal.ymdlast.members/ok.pass.cpp | 1 - .../plus_minus_equal_month.pass.cpp | 1 - .../plus_minus_equal_year.pass.cpp | 1 - .../time.cal.ymdlast.members/year.pass.cpp | 1 - .../comparisons.pass.cpp | 1 - .../minus.pass.cpp | 1 - .../time.cal.ymdlast.nonmembers/plus.pass.cpp | 1 - .../time.cal.ymwd.members/ctor.pass.cpp | 1 - .../time.cal.ymwd.members/index.pass.cpp | 1 - .../time.cal.ymwd.members/month.pass.cpp | 2 -- .../time.cal.ymwd.members/ok.pass.cpp | 1 - .../plus_minus_equal_month.pass.cpp | 2 -- .../plus_minus_equal_year.pass.cpp | 2 -- .../time.cal.ymwd.members/weekday.pass.cpp | 1 - .../weekday_indexed.pass.cpp | 1 - .../time.cal.ymwd.members/year.pass.cpp | 2 -- .../comparisons.pass.cpp | 1 - .../time.cal.ymwd.nonmembers/minus.pass.cpp | 1 - .../time.cal.ymwd.nonmembers/plus.pass.cpp | 1 - test/support/poisoned_hash_helper.hpp | 2 -- test/support/unique_ptr_test_helper.h | 1 - utils/libcxx/test/config.py | 3 --- 51 files changed, 22 insertions(+), 94 deletions(-) diff --git a/test/libcxx/depr/depr.function.objects/depr.adaptors.cxx1z.pass.cpp b/test/libcxx/depr/depr.function.objects/depr.adaptors.cxx1z.pass.cpp index 1847dac2e..7967e76d9 100644 --- a/test/libcxx/depr/depr.function.objects/depr.adaptors.cxx1z.pass.cpp +++ b/test/libcxx/depr/depr.function.objects/depr.adaptors.cxx1z.pass.cpp @@ -24,15 +24,25 @@ int identity(int v) { return v; } int sum(int a, int b) { return a + b; } struct Foo { - int zero() const { return 0; } - int identity(int v) const { return v; } - int sum(int a, int b) const { return a + b; } + int zero() { return 0; } + int zero_const() const { return 1; } + + int identity(int v) const { return v; } + int sum(int a, int b) const { return a + b; } }; int main() { typedef std::pointer_to_unary_function PUF; typedef std::pointer_to_binary_function PBF; + + static_assert( + (std::is_same(identity))>::value), + ""); + static_assert( + (std::is_same(sum))>::value), + ""); + assert((std::ptr_fun(identity)(4) == 4)); assert((std::ptr_fun(sum)(4, 5) == 9)); @@ -43,6 +53,12 @@ int main() typedef std::mem_fun_ref_t MFR; typedef std::const_mem_fun_ref_t CMFR; + static_assert( + (std::is_same::value), ""); + static_assert((std::is_same::value), + ""); + assert((std::mem_fun_ref(&Foo::zero)(f) == 0)); assert((std::mem_fun_ref(&Foo::identity)(f, 5) == 5)); } diff --git a/test/libcxx/experimental/memory/memory.polymorphic.allocator.class/memory.polymorphic.allocator.mem/construct_piecewise_pair.pass.cpp b/test/libcxx/experimental/memory/memory.polymorphic.allocator.class/memory.polymorphic.allocator.mem/construct_piecewise_pair.pass.cpp index 40bacbcba..b2150fcd2 100644 --- a/test/libcxx/experimental/memory/memory.polymorphic.allocator.class/memory.polymorphic.allocator.mem/construct_piecewise_pair.pass.cpp +++ b/test/libcxx/experimental/memory/memory.polymorphic.allocator.class/memory.polymorphic.allocator.mem/construct_piecewise_pair.pass.cpp @@ -106,14 +106,10 @@ struct CountCopiesAllocV2 { int main() { - using PMR = ex::memory_resource*; - using PMA = ex::polymorphic_allocator; - { using T = CountCopies; using U = CountCopiesAllocV1; using P = std::pair; - using TH = TestHarness

; std::tuple t1; std::tuple t2; @@ -129,7 +125,6 @@ int main() using T = CountCopiesAllocV1; using U = CountCopiesAllocV2; using P = std::pair; - using TH = TestHarness

; std::tuple t1; std::tuple t2; @@ -146,7 +141,6 @@ int main() using T = CountCopiesAllocV2; using U = CountCopiesAllocV1; using P = std::pair; - using TH = TestHarness

; std::tuple t1; std::tuple t2; @@ -163,7 +157,6 @@ int main() using T = CountCopiesAllocV2; using U = CountCopies; using P = std::pair; - using TH = TestHarness

; std::tuple t1; std::tuple t2; diff --git a/test/libcxx/experimental/memory/memory.resource.adaptor/memory.resource.adaptor.mem/db_deallocate.pass.cpp b/test/libcxx/experimental/memory/memory.resource.adaptor/memory.resource.adaptor.mem/db_deallocate.pass.cpp index ccb9b710e..ffcedf0bf 100644 --- a/test/libcxx/experimental/memory/memory.resource.adaptor/memory.resource.adaptor.mem/db_deallocate.pass.cpp +++ b/test/libcxx/experimental/memory/memory.resource.adaptor/memory.resource.adaptor.mem/db_deallocate.pass.cpp @@ -30,7 +30,7 @@ namespace ex = std::experimental::pmr; int main() { using Alloc = NullAllocator; - using R = ex::resource_adaptor; + AllocController P; ex::resource_adaptor r(Alloc{P}); ex::memory_resource & m1 = r; diff --git a/test/libcxx/thread/thread.threads/thread.thread.this/sleep_for.pass.cpp b/test/libcxx/thread/thread.threads/thread.thread.this/sleep_for.pass.cpp index b46c2cdec..3c0571bf9 100644 --- a/test/libcxx/thread/thread.threads/thread.thread.this/sleep_for.pass.cpp +++ b/test/libcxx/thread/thread.threads/thread.thread.this/sleep_for.pass.cpp @@ -57,7 +57,6 @@ int main() typedef std::chrono::system_clock Clock; typedef Clock::time_point time_point; - typedef Clock::duration duration; std::chrono::milliseconds ms(500); time_point t0 = Clock::now(); std::this_thread::sleep_for(ms); diff --git a/test/std/containers/associative/map/map.access/index_key.pass.cpp b/test/std/containers/associative/map/map.access/index_key.pass.cpp index 3b1c21fd5..5f3d109d1 100644 --- a/test/std/containers/associative/map/map.access/index_key.pass.cpp +++ b/test/std/containers/associative/map/map.access/index_key.pass.cpp @@ -84,7 +84,6 @@ int main() using Container = TCT::map<>; using Key = Container::key_type; using MappedType = Container::mapped_type; - using ValueTp = Container::value_type; ConstructController* cc = getConstructController(); cc->reset(); { diff --git a/test/std/containers/associative/map/map.access/index_rv_key.pass.cpp b/test/std/containers/associative/map/map.access/index_rv_key.pass.cpp index e5580bca3..bc91475c2 100644 --- a/test/std/containers/associative/map/map.access/index_rv_key.pass.cpp +++ b/test/std/containers/associative/map/map.access/index_rv_key.pass.cpp @@ -61,7 +61,6 @@ int main() using Container = TCT::map<>; using Key = Container::key_type; using MappedType = Container::mapped_type; - using ValueTp = Container::value_type; ConstructController* cc = getConstructController(); cc->reset(); { diff --git a/test/std/containers/container.adaptors/queue/queue.defn/emplace.pass.cpp b/test/std/containers/container.adaptors/queue/queue.defn/emplace.pass.cpp index ead9ad0bc..25f6bc76e 100644 --- a/test/std/containers/container.adaptors/queue/queue.defn/emplace.pass.cpp +++ b/test/std/containers/container.adaptors/queue/queue.defn/emplace.pass.cpp @@ -43,9 +43,9 @@ int main() test_return_type > (); test_return_type > > (); - typedef Emplaceable T; std::queue q; #if TEST_STD_VER > 14 + typedef Emplaceable T; T& r1 = q.emplace(1, 2.5); assert(&r1 == &q.back()); T& r2 = q.emplace(2, 3.5); diff --git a/test/std/containers/container.adaptors/stack/stack.defn/emplace.pass.cpp b/test/std/containers/container.adaptors/stack/stack.defn/emplace.pass.cpp index bb6ff8f91..6830cb716 100644 --- a/test/std/containers/container.adaptors/stack/stack.defn/emplace.pass.cpp +++ b/test/std/containers/container.adaptors/stack/stack.defn/emplace.pass.cpp @@ -42,9 +42,9 @@ int main() test_return_type > (); test_return_type > > (); - typedef Emplaceable T; std::stack q; #if TEST_STD_VER > 14 + typedef Emplaceable T; T& r1 = q.emplace(1, 2.5); assert(&r1 == &q.top()); T& r2 = q.emplace(2, 3.5); diff --git a/test/std/containers/map_allocator_requirement_test_templates.h b/test/std/containers/map_allocator_requirement_test_templates.h index 2ae3a2e3c..374970d48 100644 --- a/test/std/containers/map_allocator_requirement_test_templates.h +++ b/test/std/containers/map_allocator_requirement_test_templates.h @@ -33,10 +33,6 @@ template void testMapInsert() { typedef typename Container::value_type ValueTp; - typedef typename Container::key_type Key; - typedef typename Container::mapped_type Mapped; - typedef Container C; - typedef std::pair R; ConstructController* cc = getConstructController(); cc->reset(); { @@ -297,8 +293,6 @@ void testMapEmplace() typedef typename Container::key_type Key; typedef typename Container::mapped_type Mapped; typedef typename std::pair NonConstKeyPair; - typedef Container C; - typedef std::pair R; ConstructController* cc = getConstructController(); cc->reset(); { @@ -630,7 +624,6 @@ template void testMultimapInsert() { typedef typename Container::value_type ValueTp; - typedef Container C; ConstructController* cc = getConstructController(); cc->reset(); { @@ -704,7 +697,6 @@ template void testMultimapInsertHint() { typedef typename Container::value_type ValueTp; - typedef Container C; ConstructController* cc = getConstructController(); cc->reset(); { diff --git a/test/std/containers/sequences/forwardlist/forwardlist.modifiers/resize_size_value.pass.cpp b/test/std/containers/sequences/forwardlist/forwardlist.modifiers/resize_size_value.pass.cpp index 356e0d657..297e2725a 100644 --- a/test/std/containers/sequences/forwardlist/forwardlist.modifiers/resize_size_value.pass.cpp +++ b/test/std/containers/sequences/forwardlist/forwardlist.modifiers/resize_size_value.pass.cpp @@ -88,7 +88,6 @@ int main() { // Test that the allocator's construct method is being used to // construct the new elements and that it's called exactly N times. - typedef int T; typedef std::forward_list> Container; ConstructController* cc = getConstructController(); cc->reset(); diff --git a/test/std/containers/sequences/list/list.cons/input_iterator.pass.cpp b/test/std/containers/sequences/list/list.cons/input_iterator.pass.cpp index 3cdcc7362..d2c7fa023 100644 --- a/test/std/containers/sequences/list/list.cons/input_iterator.pass.cpp +++ b/test/std/containers/sequences/list/list.cons/input_iterator.pass.cpp @@ -183,7 +183,6 @@ void test_ctor_under_alloc() { int arr2[] = {1, 101, 42}; { using C = TCT::list<>; - using T = typename C::value_type; using It = forward_iterator; { ExpectConstructGuard G(1); @@ -196,7 +195,6 @@ void test_ctor_under_alloc() { } { using C = TCT::list<>; - using T = typename C::value_type; using It = input_iterator; { ExpectConstructGuard G(1); @@ -216,7 +214,6 @@ void test_ctor_under_alloc_with_alloc() { int arr2[] = {1, 101, 42}; { using C = TCT::list<>; - using T = typename C::value_type; using It = forward_iterator; using Alloc = typename C::allocator_type; Alloc a; @@ -231,7 +228,6 @@ void test_ctor_under_alloc_with_alloc() { } { using C = TCT::list<>; - using T = typename C::value_type; using It = input_iterator; using Alloc = typename C::allocator_type; Alloc a; diff --git a/test/std/containers/sequences/vector/vector.cons/construct_iter_iter.pass.cpp b/test/std/containers/sequences/vector/vector.cons/construct_iter_iter.pass.cpp index 88613efe7..21a7df4a7 100644 --- a/test/std/containers/sequences/vector/vector.cons/construct_iter_iter.pass.cpp +++ b/test/std/containers/sequences/vector/vector.cons/construct_iter_iter.pass.cpp @@ -121,7 +121,6 @@ void test_ctor_under_alloc() { int arr2[] = {1, 101, 42}; { using C = TCT::vector<>; - using T = typename C::value_type; using It = forward_iterator; { ExpectConstructGuard G(1); @@ -134,7 +133,6 @@ void test_ctor_under_alloc() { } { using C = TCT::vector<>; - using T = typename C::value_type; using It = input_iterator; { ExpectConstructGuard G(1); diff --git a/test/std/containers/sequences/vector/vector.cons/construct_iter_iter_alloc.pass.cpp b/test/std/containers/sequences/vector/vector.cons/construct_iter_iter_alloc.pass.cpp index 71743b31d..15498ba41 100644 --- a/test/std/containers/sequences/vector/vector.cons/construct_iter_iter_alloc.pass.cpp +++ b/test/std/containers/sequences/vector/vector.cons/construct_iter_iter_alloc.pass.cpp @@ -134,7 +134,6 @@ void test_ctor_under_alloc() { int arr2[] = {1, 101, 42}; { using C = TCT::vector<>; - using T = typename C::value_type; using It = forward_iterator; using Alloc = typename C::allocator_type; Alloc a; @@ -149,7 +148,6 @@ void test_ctor_under_alloc() { } { using C = TCT::vector<>; - using T = typename C::value_type; using It = input_iterator; using Alloc = typename C::allocator_type; Alloc a; diff --git a/test/std/containers/set_allocator_requirement_test_templates.h b/test/std/containers/set_allocator_requirement_test_templates.h index f82ca7dc8..517c36d8e 100644 --- a/test/std/containers/set_allocator_requirement_test_templates.h +++ b/test/std/containers/set_allocator_requirement_test_templates.h @@ -32,8 +32,6 @@ template void testSetInsert() { typedef typename Container::value_type ValueTp; - typedef Container C; - typedef std::pair R; ConstructController* cc = getConstructController(); cc->reset(); { @@ -146,8 +144,6 @@ template void testSetEmplace() { typedef typename Container::value_type ValueTp; - typedef Container C; - typedef std::pair R; ConstructController* cc = getConstructController(); cc->reset(); { @@ -209,7 +205,6 @@ template void testSetEmplaceHint() { typedef typename Container::value_type ValueTp; - typedef Container C; typedef typename C::iterator It; ConstructController* cc = getConstructController(); @@ -289,7 +284,6 @@ template void testMultisetInsert() { typedef typename Container::value_type ValueTp; - typedef Container C; ConstructController* cc = getConstructController(); cc->reset(); { @@ -356,8 +350,6 @@ template void testMultisetEmplace() { typedef typename Container::value_type ValueTp; - typedef Container C; - typedef std::pair R; ConstructController* cc = getConstructController(); cc->reset(); { diff --git a/test/std/containers/unord/unord.map/unord.map.elem/index.pass.cpp b/test/std/containers/unord/unord.map/unord.map.elem/index.pass.cpp index 7bc59447a..f7f3a22d5 100644 --- a/test/std/containers/unord/unord.map/unord.map.elem/index.pass.cpp +++ b/test/std/containers/unord/unord.map/unord.map.elem/index.pass.cpp @@ -119,7 +119,6 @@ int main() using Container = TCT::unordered_map<>; using Key = Container::key_type; using MappedType = Container::mapped_type; - using ValueTp = Container::value_type; ConstructController* cc = getConstructController(); cc->reset(); { diff --git a/test/std/input.output/filesystems/class.directory_iterator/directory_iterator.members/increment.pass.cpp b/test/std/input.output/filesystems/class.directory_iterator/directory_iterator.members/increment.pass.cpp index 7ec814b21..a641e9237 100644 --- a/test/std/input.output/filesystems/class.directory_iterator/directory_iterator.members/increment.pass.cpp +++ b/test/std/input.output/filesystems/class.directory_iterator/directory_iterator.members/increment.pass.cpp @@ -32,7 +32,6 @@ TEST_SUITE(directory_iterator_increment_tests) TEST_CASE(test_increment_signatures) { - using D = directory_iterator; directory_iterator d; ((void)d); std::error_code ec; ((void)ec); diff --git a/test/std/input.output/filesystems/class.directory_iterator/directory_iterator.nonmembers/begin_end.pass.cpp b/test/std/input.output/filesystems/class.directory_iterator/directory_iterator.nonmembers/begin_end.pass.cpp index 71e8e55ae..1aa177505 100644 --- a/test/std/input.output/filesystems/class.directory_iterator/directory_iterator.nonmembers/begin_end.pass.cpp +++ b/test/std/input.output/filesystems/class.directory_iterator/directory_iterator.nonmembers/begin_end.pass.cpp @@ -32,7 +32,6 @@ TEST_SUITE(directory_iterator_begin_end_tests) TEST_CASE(test_function_signatures) { - using D = directory_iterator; directory_iterator d; ((void)d); ASSERT_SAME_TYPE(decltype(begin(d)), directory_iterator); diff --git a/test/std/input.output/filesystems/class.rec.dir.itr/rec.dir.itr.members/increment.pass.cpp b/test/std/input.output/filesystems/class.rec.dir.itr/rec.dir.itr.members/increment.pass.cpp index bfc818924..2d30cc3b8 100644 --- a/test/std/input.output/filesystems/class.rec.dir.itr/rec.dir.itr.members/increment.pass.cpp +++ b/test/std/input.output/filesystems/class.rec.dir.itr/rec.dir.itr.members/increment.pass.cpp @@ -31,7 +31,6 @@ TEST_SUITE(recursive_directory_iterator_increment_tests) TEST_CASE(test_increment_signatures) { - using D = recursive_directory_iterator; recursive_directory_iterator d; ((void)d); std::error_code ec; ((void)ec); diff --git a/test/std/input.output/filesystems/class.rec.dir.itr/rec.dir.itr.nonmembers/begin_end.pass.cpp b/test/std/input.output/filesystems/class.rec.dir.itr/rec.dir.itr.nonmembers/begin_end.pass.cpp index 04bc2dd1d..9807309f4 100644 --- a/test/std/input.output/filesystems/class.rec.dir.itr/rec.dir.itr.nonmembers/begin_end.pass.cpp +++ b/test/std/input.output/filesystems/class.rec.dir.itr/rec.dir.itr.nonmembers/begin_end.pass.cpp @@ -32,7 +32,6 @@ TEST_SUITE(recursive_directory_iterator_begin_end_tests) TEST_CASE(test_function_signatures) { - using D = recursive_directory_iterator; recursive_directory_iterator d; ((void)d); ASSERT_SAME_TYPE(decltype(begin(d)), recursive_directory_iterator); diff --git a/test/std/input.output/filesystems/fs.op.funcs/fs.op.last_write_time/last_write_time.pass.cpp b/test/std/input.output/filesystems/fs.op.funcs/fs.op.last_write_time/last_write_time.pass.cpp index bc77f3f63..7a17f9577 100644 --- a/test/std/input.output/filesystems/fs.op.funcs/fs.op.last_write_time/last_write_time.pass.cpp +++ b/test/std/input.output/filesystems/fs.op.funcs/fs.op.last_write_time/last_write_time.pass.cpp @@ -108,7 +108,6 @@ struct Times { }; Times GetTimes(path const& p) { - using Clock = file_time_type::clock; StatT st; if (::stat(p.c_str(), &st) == -1) { std::error_code ec(errno, std::generic_category()); @@ -127,7 +126,6 @@ TimeSpec LastAccessTime(path const& p) { return GetTimes(p).access; } TimeSpec LastWriteTime(path const& p) { return GetTimes(p).write; } std::pair GetSymlinkTimes(path const& p) { - using Clock = file_time_type::clock; StatT st; if (::lstat(p.c_str(), &st) == -1) { std::error_code ec(errno, std::generic_category()); @@ -510,7 +508,6 @@ TEST_CASE(last_write_time_symlink_test) TEST_CASE(test_write_min_time) { - using Clock = file_time_type::clock; scoped_test_env env; const path p = env.create_file("file", 42); const file_time_type old_time = last_write_time(p); @@ -545,10 +542,6 @@ TEST_CASE(test_write_min_time) } TEST_CASE(test_write_max_time) { - using Clock = file_time_type::clock; - using Sec = std::chrono::seconds; - using Hours = std::chrono::hours; - scoped_test_env env; const path p = env.create_file("file", 42); const file_time_type old_time = last_write_time(p); diff --git a/test/std/utilities/meta/meta.type.synop/endian.pass.cpp b/test/std/utilities/meta/meta.type.synop/endian.pass.cpp index cf0ab2d26..865c477e7 100644 --- a/test/std/utilities/meta/meta.type.synop/endian.pass.cpp +++ b/test/std/utilities/meta/meta.type.synop/endian.pass.cpp @@ -19,7 +19,6 @@ #include "test_macros.h" int main() { - typedef std::endian E; static_assert(std::is_enum::value, ""); // Check that E is a scoped enum by checking for conversions. diff --git a/test/std/utilities/time/time.cal/time.cal.md/time.cal.md.members/day.pass.cpp b/test/std/utilities/time/time.cal/time.cal.md/time.cal.md.members/day.pass.cpp index d4b88cc01..5bc001c47 100644 --- a/test/std/utilities/time/time.cal/time.cal.md/time.cal.md.members/day.pass.cpp +++ b/test/std/utilities/time/time.cal/time.cal.md/time.cal.md.members/day.pass.cpp @@ -23,7 +23,6 @@ int main() { using day = std::chrono::day; - using month = std::chrono::month; using month_day = std::chrono::month_day; ASSERT_NOEXCEPT( std::declval().day()); diff --git a/test/std/utilities/time/time.cal/time.cal.operators/year_month_day.pass.cpp b/test/std/utilities/time/time.cal/time.cal.operators/year_month_day.pass.cpp index 378d2906d..d2dfc1321 100644 --- a/test/std/utilities/time/time.cal/time.cal.operators/year_month_day.pass.cpp +++ b/test/std/utilities/time/time.cal/time.cal.operators/year_month_day.pass.cpp @@ -51,7 +51,6 @@ int main() using year_month = std::chrono::year_month; using month_day = std::chrono::month_day; using year_month_day = std::chrono::year_month_day; - using weekday = std::chrono::weekday; constexpr month February = std::chrono::February; constexpr year_month Feb2018{year{2018}, February}; diff --git a/test/std/utilities/time/time.cal/time.cal.operators/year_month_day_last.pass.cpp b/test/std/utilities/time/time.cal/time.cal.operators/year_month_day_last.pass.cpp index fd0100856..dc884638d 100644 --- a/test/std/utilities/time/time.cal/time.cal.operators/year_month_day_last.pass.cpp +++ b/test/std/utilities/time/time.cal/time.cal.operators/year_month_day_last.pass.cpp @@ -41,13 +41,9 @@ int main() { - using month_weekday = std::chrono::month_weekday; using month = std::chrono::month; using year_month = std::chrono::year_month; using year = std::chrono::year; - using weekday_last = std::chrono::weekday_last; - using weekday = std::chrono::weekday; - using month_weekday_last = std::chrono::month_weekday_last; using month_day_last = std::chrono::month_day_last; using year_month_day_last = std::chrono::year_month_day_last; diff --git a/test/std/utilities/time/time.cal/time.cal.operators/year_month_weekday_last.pass.cpp b/test/std/utilities/time/time.cal/time.cal.operators/year_month_weekday_last.pass.cpp index 717d16c56..84ea86c22 100644 --- a/test/std/utilities/time/time.cal/time.cal.operators/year_month_weekday_last.pass.cpp +++ b/test/std/utilities/time/time.cal/time.cal.operators/year_month_weekday_last.pass.cpp @@ -43,7 +43,6 @@ int main() { using year_month = std::chrono::year_month; - using month_weekday = std::chrono::month_weekday; using year = std::chrono::year; using month = std::chrono::month; using weekday = std::chrono::weekday; diff --git a/test/std/utilities/time/time.cal/time.cal.year/time.cal.year.members/plus_minus.pass.cpp b/test/std/utilities/time/time.cal/time.cal.year/time.cal.year.members/plus_minus.pass.cpp index 248075543..c74b5f801 100644 --- a/test/std/utilities/time/time.cal/time.cal.year/time.cal.year.members/plus_minus.pass.cpp +++ b/test/std/utilities/time/time.cal/time.cal.year/time.cal.year.members/plus_minus.pass.cpp @@ -32,7 +32,6 @@ constexpr bool testConstexpr() int main() { using year = std::chrono::year; - using years = std::chrono::years; ASSERT_NOEXCEPT(+std::declval()); ASSERT_NOEXCEPT(-std::declval()); diff --git a/test/std/utilities/time/time.cal/time.cal.ymdlast/time.cal.ymdlast.members/ctor.pass.cpp b/test/std/utilities/time/time.cal/time.cal.ymdlast/time.cal.ymdlast.members/ctor.pass.cpp index d0715e608..e2a6a7acf 100644 --- a/test/std/utilities/time/time.cal/time.cal.ymdlast/time.cal.ymdlast.members/ctor.pass.cpp +++ b/test/std/utilities/time/time.cal/time.cal.ymdlast/time.cal.ymdlast.members/ctor.pass.cpp @@ -32,7 +32,6 @@ int main() { using year = std::chrono::year; using month = std::chrono::month; - using day = std::chrono::day; using month_day_last = std::chrono::month_day_last; using year_month_day_last = std::chrono::year_month_day_last; diff --git a/test/std/utilities/time/time.cal/time.cal.ymdlast/time.cal.ymdlast.members/month.pass.cpp b/test/std/utilities/time/time.cal/time.cal.ymdlast/time.cal.ymdlast.members/month.pass.cpp index a689394f1..43ec42d94 100644 --- a/test/std/utilities/time/time.cal/time.cal.ymdlast/time.cal.ymdlast.members/month.pass.cpp +++ b/test/std/utilities/time/time.cal/time.cal.ymdlast/time.cal.ymdlast.members/month.pass.cpp @@ -24,7 +24,6 @@ int main() { using year = std::chrono::year; using month = std::chrono::month; - using day = std::chrono::day; using month_day_last = std::chrono::month_day_last; using year_month_day_last = std::chrono::year_month_day_last; diff --git a/test/std/utilities/time/time.cal/time.cal.ymdlast/time.cal.ymdlast.members/month_day_last.pass.cpp b/test/std/utilities/time/time.cal/time.cal.ymdlast/time.cal.ymdlast.members/month_day_last.pass.cpp index 2acfc5c21..613cc1c6b 100644 --- a/test/std/utilities/time/time.cal/time.cal.ymdlast/time.cal.ymdlast.members/month_day_last.pass.cpp +++ b/test/std/utilities/time/time.cal/time.cal.ymdlast/time.cal.ymdlast.members/month_day_last.pass.cpp @@ -24,7 +24,6 @@ int main() { using year = std::chrono::year; using month = std::chrono::month; - using day = std::chrono::day; using month_day_last = std::chrono::month_day_last; using year_month_day_last = std::chrono::year_month_day_last; diff --git a/test/std/utilities/time/time.cal/time.cal.ymdlast/time.cal.ymdlast.members/ok.pass.cpp b/test/std/utilities/time/time.cal/time.cal.ymdlast/time.cal.ymdlast.members/ok.pass.cpp index acff45b6e..7b61214b7 100644 --- a/test/std/utilities/time/time.cal/time.cal.ymdlast/time.cal.ymdlast.members/ok.pass.cpp +++ b/test/std/utilities/time/time.cal/time.cal.ymdlast/time.cal.ymdlast.members/ok.pass.cpp @@ -24,7 +24,6 @@ int main() { using year = std::chrono::year; using month = std::chrono::month; - using day = std::chrono::day; using month_day_last = std::chrono::month_day_last; using year_month_day_last = std::chrono::year_month_day_last; diff --git a/test/std/utilities/time/time.cal/time.cal.ymdlast/time.cal.ymdlast.members/plus_minus_equal_month.pass.cpp b/test/std/utilities/time/time.cal/time.cal.ymdlast/time.cal.ymdlast.members/plus_minus_equal_month.pass.cpp index d44fb78b1..bfa1d58d9 100644 --- a/test/std/utilities/time/time.cal/time.cal.ymdlast/time.cal.ymdlast.members/plus_minus_equal_month.pass.cpp +++ b/test/std/utilities/time/time.cal/time.cal.ymdlast/time.cal.ymdlast.members/plus_minus_equal_month.pass.cpp @@ -37,7 +37,6 @@ int main() { using year = std::chrono::year; using month = std::chrono::month; - using day = std::chrono::day; using month_day_last = std::chrono::month_day_last; using year_month_day_last = std::chrono::year_month_day_last; using months = std::chrono::months; diff --git a/test/std/utilities/time/time.cal/time.cal.ymdlast/time.cal.ymdlast.members/plus_minus_equal_year.pass.cpp b/test/std/utilities/time/time.cal/time.cal.ymdlast/time.cal.ymdlast.members/plus_minus_equal_year.pass.cpp index 602226606..ce364d236 100644 --- a/test/std/utilities/time/time.cal/time.cal.ymdlast/time.cal.ymdlast.members/plus_minus_equal_year.pass.cpp +++ b/test/std/utilities/time/time.cal/time.cal.ymdlast/time.cal.ymdlast.members/plus_minus_equal_year.pass.cpp @@ -37,7 +37,6 @@ int main() { using year = std::chrono::year; using month = std::chrono::month; - using day = std::chrono::day; using month_day_last = std::chrono::month_day_last; using year_month_day_last = std::chrono::year_month_day_last; using years = std::chrono::years; diff --git a/test/std/utilities/time/time.cal/time.cal.ymdlast/time.cal.ymdlast.members/year.pass.cpp b/test/std/utilities/time/time.cal/time.cal.ymdlast/time.cal.ymdlast.members/year.pass.cpp index 3e4f1cd03..0f4da09dc 100644 --- a/test/std/utilities/time/time.cal/time.cal.ymdlast/time.cal.ymdlast.members/year.pass.cpp +++ b/test/std/utilities/time/time.cal/time.cal.ymdlast/time.cal.ymdlast.members/year.pass.cpp @@ -24,7 +24,6 @@ int main() { using year = std::chrono::year; using month = std::chrono::month; - using day = std::chrono::day; using month_day_last = std::chrono::month_day_last; using year_month_day_last = std::chrono::year_month_day_last; diff --git a/test/std/utilities/time/time.cal/time.cal.ymdlast/time.cal.ymdlast.nonmembers/comparisons.pass.cpp b/test/std/utilities/time/time.cal/time.cal.ymdlast/time.cal.ymdlast.nonmembers/comparisons.pass.cpp index 87cbc6df4..d4e4a1185 100644 --- a/test/std/utilities/time/time.cal/time.cal.ymdlast/time.cal.ymdlast.nonmembers/comparisons.pass.cpp +++ b/test/std/utilities/time/time.cal/time.cal.ymdlast/time.cal.ymdlast.nonmembers/comparisons.pass.cpp @@ -31,7 +31,6 @@ int main() { using year = std::chrono::year; using month = std::chrono::month; - using day = std::chrono::day; using month_day_last = std::chrono::month_day_last; using year_month_day_last = std::chrono::year_month_day_last; diff --git a/test/std/utilities/time/time.cal/time.cal.ymdlast/time.cal.ymdlast.nonmembers/minus.pass.cpp b/test/std/utilities/time/time.cal/time.cal.ymdlast/time.cal.ymdlast.nonmembers/minus.pass.cpp index cd7f31732..1c8d4e7af 100644 --- a/test/std/utilities/time/time.cal/time.cal.ymdlast/time.cal.ymdlast.nonmembers/minus.pass.cpp +++ b/test/std/utilities/time/time.cal/time.cal.ymdlast/time.cal.ymdlast.nonmembers/minus.pass.cpp @@ -52,7 +52,6 @@ int main() { using year = std::chrono::year; using month = std::chrono::month; - using day = std::chrono::day; using month_day_last = std::chrono::month_day_last; using year_month_day_last = std::chrono::year_month_day_last; using months = std::chrono::months; diff --git a/test/std/utilities/time/time.cal/time.cal.ymdlast/time.cal.ymdlast.nonmembers/plus.pass.cpp b/test/std/utilities/time/time.cal/time.cal.ymdlast/time.cal.ymdlast.nonmembers/plus.pass.cpp index 9861d272f..25ab85d8f 100644 --- a/test/std/utilities/time/time.cal/time.cal.ymdlast/time.cal.ymdlast.nonmembers/plus.pass.cpp +++ b/test/std/utilities/time/time.cal/time.cal.ymdlast/time.cal.ymdlast.nonmembers/plus.pass.cpp @@ -68,7 +68,6 @@ int main() { using year = std::chrono::year; using month = std::chrono::month; - using day = std::chrono::day; using month_day_last = std::chrono::month_day_last; using year_month_day_last = std::chrono::year_month_day_last; using months = std::chrono::months; diff --git a/test/std/utilities/time/time.cal/time.cal.ymwd/time.cal.ymwd.members/ctor.pass.cpp b/test/std/utilities/time/time.cal/time.cal.ymwd/time.cal.ymwd.members/ctor.pass.cpp index 583abd029..751de6091 100644 --- a/test/std/utilities/time/time.cal/time.cal.ymwd/time.cal.ymwd.members/ctor.pass.cpp +++ b/test/std/utilities/time/time.cal/time.cal.ymwd/time.cal.ymwd.members/ctor.pass.cpp @@ -35,7 +35,6 @@ int main() { using year = std::chrono::year; using month = std::chrono::month; - using day = std::chrono::day; using weekday = std::chrono::weekday; using weekday_indexed = std::chrono::weekday_indexed; using year_month_weekday = std::chrono::year_month_weekday; diff --git a/test/std/utilities/time/time.cal/time.cal.ymwd/time.cal.ymwd.members/index.pass.cpp b/test/std/utilities/time/time.cal/time.cal.ymwd/time.cal.ymwd.members/index.pass.cpp index 7d6a04b85..5a29b8218 100644 --- a/test/std/utilities/time/time.cal/time.cal.ymwd/time.cal.ymwd.members/index.pass.cpp +++ b/test/std/utilities/time/time.cal/time.cal.ymwd/time.cal.ymwd.members/index.pass.cpp @@ -24,7 +24,6 @@ int main() { using year = std::chrono::year; using month = std::chrono::month; - using day = std::chrono::day; using weekday = std::chrono::weekday; using weekday_indexed = std::chrono::weekday_indexed; using year_month_weekday = std::chrono::year_month_weekday; diff --git a/test/std/utilities/time/time.cal/time.cal.ymwd/time.cal.ymwd.members/month.pass.cpp b/test/std/utilities/time/time.cal/time.cal.ymwd/time.cal.ymwd.members/month.pass.cpp index 13122e087..5749da9af 100644 --- a/test/std/utilities/time/time.cal/time.cal.ymwd/time.cal.ymwd.members/month.pass.cpp +++ b/test/std/utilities/time/time.cal/time.cal.ymwd/time.cal.ymwd.members/month.pass.cpp @@ -24,8 +24,6 @@ int main() { using year = std::chrono::year; using month = std::chrono::month; - using day = std::chrono::day; - using weekday = std::chrono::weekday; using weekday_indexed = std::chrono::weekday_indexed; using year_month_weekday = std::chrono::year_month_weekday; diff --git a/test/std/utilities/time/time.cal/time.cal.ymwd/time.cal.ymwd.members/ok.pass.cpp b/test/std/utilities/time/time.cal/time.cal.ymwd/time.cal.ymwd.members/ok.pass.cpp index cb669f807..97f898986 100644 --- a/test/std/utilities/time/time.cal/time.cal.ymwd/time.cal.ymwd.members/ok.pass.cpp +++ b/test/std/utilities/time/time.cal/time.cal.ymwd/time.cal.ymwd.members/ok.pass.cpp @@ -24,7 +24,6 @@ int main() { using year = std::chrono::year; using month = std::chrono::month; - using day = std::chrono::day; using weekday = std::chrono::weekday; using weekday_indexed = std::chrono::weekday_indexed; using year_month_weekday = std::chrono::year_month_weekday; diff --git a/test/std/utilities/time/time.cal/time.cal.ymwd/time.cal.ymwd.members/plus_minus_equal_month.pass.cpp b/test/std/utilities/time/time.cal/time.cal.ymwd/time.cal.ymwd.members/plus_minus_equal_month.pass.cpp index 2007454ca..c5e101250 100644 --- a/test/std/utilities/time/time.cal/time.cal.ymwd/time.cal.ymwd.members/plus_minus_equal_month.pass.cpp +++ b/test/std/utilities/time/time.cal/time.cal.ymwd/time.cal.ymwd.members/plus_minus_equal_month.pass.cpp @@ -37,11 +37,9 @@ int main() { using year = std::chrono::year; using month = std::chrono::month; - using day = std::chrono::day; using weekday = std::chrono::weekday; using weekday_indexed = std::chrono::weekday_indexed; using year_month_weekday = std::chrono::year_month_weekday; - using years = std::chrono::years; using months = std::chrono::months; diff --git a/test/std/utilities/time/time.cal/time.cal.ymwd/time.cal.ymwd.members/plus_minus_equal_year.pass.cpp b/test/std/utilities/time/time.cal/time.cal.ymwd/time.cal.ymwd.members/plus_minus_equal_year.pass.cpp index be62a1d6f..86830249e 100644 --- a/test/std/utilities/time/time.cal/time.cal.ymwd/time.cal.ymwd.members/plus_minus_equal_year.pass.cpp +++ b/test/std/utilities/time/time.cal/time.cal.ymwd/time.cal.ymwd.members/plus_minus_equal_year.pass.cpp @@ -37,12 +37,10 @@ int main() { using year = std::chrono::year; using month = std::chrono::month; - using day = std::chrono::day; using weekday = std::chrono::weekday; using weekday_indexed = std::chrono::weekday_indexed; using year_month_weekday = std::chrono::year_month_weekday; using years = std::chrono::years; - using months = std::chrono::months; ASSERT_NOEXCEPT( std::declval() += std::declval()); ASSERT_SAME_TYPE(year_month_weekday&, decltype(std::declval() += std::declval())); diff --git a/test/std/utilities/time/time.cal/time.cal.ymwd/time.cal.ymwd.members/weekday.pass.cpp b/test/std/utilities/time/time.cal/time.cal.ymwd/time.cal.ymwd.members/weekday.pass.cpp index e52255d3d..ad9bc6ee6 100644 --- a/test/std/utilities/time/time.cal/time.cal.ymwd/time.cal.ymwd.members/weekday.pass.cpp +++ b/test/std/utilities/time/time.cal/time.cal.ymwd/time.cal.ymwd.members/weekday.pass.cpp @@ -24,7 +24,6 @@ int main() { using year = std::chrono::year; using month = std::chrono::month; - using day = std::chrono::day; using weekday = std::chrono::weekday; using weekday_indexed = std::chrono::weekday_indexed; using year_month_weekday = std::chrono::year_month_weekday; diff --git a/test/std/utilities/time/time.cal/time.cal.ymwd/time.cal.ymwd.members/weekday_indexed.pass.cpp b/test/std/utilities/time/time.cal/time.cal.ymwd/time.cal.ymwd.members/weekday_indexed.pass.cpp index 963112b4a..52d918e55 100644 --- a/test/std/utilities/time/time.cal/time.cal.ymwd/time.cal.ymwd.members/weekday_indexed.pass.cpp +++ b/test/std/utilities/time/time.cal/time.cal.ymwd/time.cal.ymwd.members/weekday_indexed.pass.cpp @@ -24,7 +24,6 @@ int main() { using year = std::chrono::year; using month = std::chrono::month; - using day = std::chrono::day; using weekday = std::chrono::weekday; using weekday_indexed = std::chrono::weekday_indexed; using year_month_weekday = std::chrono::year_month_weekday; diff --git a/test/std/utilities/time/time.cal/time.cal.ymwd/time.cal.ymwd.members/year.pass.cpp b/test/std/utilities/time/time.cal/time.cal.ymwd/time.cal.ymwd.members/year.pass.cpp index 55b549d51..5cf1cbaf7 100644 --- a/test/std/utilities/time/time.cal/time.cal.ymwd/time.cal.ymwd.members/year.pass.cpp +++ b/test/std/utilities/time/time.cal/time.cal.ymwd/time.cal.ymwd.members/year.pass.cpp @@ -24,8 +24,6 @@ int main() { using year = std::chrono::year; using month = std::chrono::month; - using day = std::chrono::day; - using weekday = std::chrono::weekday; using weekday_indexed = std::chrono::weekday_indexed; using year_month_weekday = std::chrono::year_month_weekday; diff --git a/test/std/utilities/time/time.cal/time.cal.ymwd/time.cal.ymwd.nonmembers/comparisons.pass.cpp b/test/std/utilities/time/time.cal/time.cal.ymwd/time.cal.ymwd.nonmembers/comparisons.pass.cpp index f545898a0..fc13709cd 100644 --- a/test/std/utilities/time/time.cal/time.cal.ymwd/time.cal.ymwd.nonmembers/comparisons.pass.cpp +++ b/test/std/utilities/time/time.cal/time.cal.ymwd/time.cal.ymwd.nonmembers/comparisons.pass.cpp @@ -27,7 +27,6 @@ int main() { using year = std::chrono::year; using month = std::chrono::month; - using day = std::chrono::day; using weekday_indexed = std::chrono::weekday_indexed; using weekday = std::chrono::weekday; using year_month_weekday = std::chrono::year_month_weekday; diff --git a/test/std/utilities/time/time.cal/time.cal.ymwd/time.cal.ymwd.nonmembers/minus.pass.cpp b/test/std/utilities/time/time.cal/time.cal.ymwd/time.cal.ymwd.nonmembers/minus.pass.cpp index 9bd0eaeb8..0b217414c 100644 --- a/test/std/utilities/time/time.cal/time.cal.ymwd/time.cal.ymwd.nonmembers/minus.pass.cpp +++ b/test/std/utilities/time/time.cal/time.cal.ymwd/time.cal.ymwd.nonmembers/minus.pass.cpp @@ -55,7 +55,6 @@ int main() { using year = std::chrono::year; using month = std::chrono::month; - using day = std::chrono::day; using weekday = std::chrono::weekday; using weekday_indexed = std::chrono::weekday_indexed; using year_month_weekday = std::chrono::year_month_weekday; diff --git a/test/std/utilities/time/time.cal/time.cal.ymwd/time.cal.ymwd.nonmembers/plus.pass.cpp b/test/std/utilities/time/time.cal/time.cal.ymwd/time.cal.ymwd.nonmembers/plus.pass.cpp index 133961351..50572c0c4 100644 --- a/test/std/utilities/time/time.cal/time.cal.ymwd/time.cal.ymwd.nonmembers/plus.pass.cpp +++ b/test/std/utilities/time/time.cal/time.cal.ymwd/time.cal.ymwd.nonmembers/plus.pass.cpp @@ -56,7 +56,6 @@ int main() { using year = std::chrono::year; using month = std::chrono::month; - using day = std::chrono::day; using weekday = std::chrono::weekday; using weekday_indexed = std::chrono::weekday_indexed; using year_month_weekday = std::chrono::year_month_weekday; diff --git a/test/support/poisoned_hash_helper.hpp b/test/support/poisoned_hash_helper.hpp index 6f42ebf8b..07cb72692 100644 --- a/test/support/poisoned_hash_helper.hpp +++ b/test/support/poisoned_hash_helper.hpp @@ -147,7 +147,6 @@ void test_hash_enabled(InputKey const& key) { #endif // Hashable requirements - using CKey = ConvertibleTo; static_assert(can_hash(), ""); static_assert(can_hash(), ""); static_assert(can_hash(), ""); @@ -187,7 +186,6 @@ void test_hash_disabled() { >::value, ""); // Hashable requirements - using CKey = ConvertibleTo; static_assert(!can_hash(), ""); static_assert(!can_hash(), ""); static_assert(!can_hash(), ""); diff --git a/test/support/unique_ptr_test_helper.h b/test/support/unique_ptr_test_helper.h index 6fb9eaa24..18c8f780b 100644 --- a/test/support/unique_ptr_test_helper.h +++ b/test/support/unique_ptr_test_helper.h @@ -98,7 +98,6 @@ public: template , class... Args> void doIncompleteTypeTest(int expect_alive, Args&&... ctor_args) { - using ValueT = typename std::remove_all_extents::type; checkNumIncompleteTypeAlive(expect_alive); { StoresIncomplete sptr(std::forward(ctor_args)...); diff --git a/utils/libcxx/test/config.py b/utils/libcxx/test/config.py index 218bee915..62a13938b 100644 --- a/utils/libcxx/test/config.py +++ b/utils/libcxx/test/config.py @@ -931,9 +931,6 @@ class Configuration(object): self.cxx.addWarningFlagIfSupported('-Wunused-variable') self.cxx.addWarningFlagIfSupported('-Wunused-parameter') self.cxx.addWarningFlagIfSupported('-Wunreachable-code') - # FIXME: Enable the two warnings below. - # self.cxx.addWarningFlagIfSupported('-Wno-conversion') - self.cxx.addWarningFlagIfSupported('-Wno-unused-local-typedef') std = self.get_lit_conf('std', None) if std in ['c++98', 'c++03']: # The '#define static_assert' provided by libc++ in C++03 mode