[libcxx-commits] [libcxx] c479e0c - [libc++] NFC: Fix several GCC warnings in the test suite

Louis Dionne via libcxx-commits libcxx-commits at lists.llvm.org
Fri Oct 30 09:49:05 PDT 2020


Author: Louis Dionne
Date: 2020-10-30T12:48:05-04:00
New Revision: c479e0c99459e4c5596c2a22829d0937224df0bf

URL: https://github.com/llvm/llvm-project/commit/c479e0c99459e4c5596c2a22829d0937224df0bf
DIFF: https://github.com/llvm/llvm-project/commit/c479e0c99459e4c5596c2a22829d0937224df0bf.diff

LOG: [libc++] NFC: Fix several GCC warnings in the test suite

- Several -Wshadow warnings
- Several places where we did not initialize our base class explicitly
- Unused variable warnings
- Some tautological comparisons
- Some places where we'd pass null arguments to functions expecting
  non-null (in unevaluated contexts)
- Add a few pragmas to turn off spurious warnings
- Fix warnings about declarations that don't declare anything
- Properly disable deprecation warnings in ext/ tests (the pragmas we
  were using didn't work on GCC)
- Disable include_as_c.sh.cpp because GCC complains about C++ flags
  when compiling as C. I couldn't find a way to fix this one properly,
  so I'm disabling the test. This isn't great, but at least we'll be
  able to enable warnings in the whole test suite with GCC.

Added: 
    

Modified: 
    libcxx/src/filesystem/filesystem_common.h
    libcxx/test/libcxx/containers/gnu_cxx/hash_map.pass.cpp
    libcxx/test/libcxx/containers/gnu_cxx/hash_map_name_lookup.pass.cpp
    libcxx/test/libcxx/containers/gnu_cxx/hash_set.pass.cpp
    libcxx/test/libcxx/containers/gnu_cxx/hash_set_name_lookup.pass.cpp
    libcxx/test/libcxx/containers/sequences/deque/spare_block_handling.pass.cpp
    libcxx/test/libcxx/include_as_c.sh.cpp
    libcxx/test/std/algorithms/alg.nonmodifying/alg.search/search.pass.cpp
    libcxx/test/std/containers/container.adaptors/priority.queue/priqueue.cons.alloc/ctor_alloc.pass.cpp
    libcxx/test/std/containers/container.adaptors/priority.queue/priqueue.cons.alloc/ctor_comp_alloc.pass.cpp
    libcxx/test/std/containers/container.adaptors/priority.queue/priqueue.cons.alloc/ctor_comp_cont_alloc.pass.cpp
    libcxx/test/std/containers/container.adaptors/priority.queue/priqueue.cons.alloc/ctor_comp_rcont_alloc.pass.cpp
    libcxx/test/std/containers/container.adaptors/priority.queue/priqueue.cons.alloc/ctor_copy_alloc.pass.cpp
    libcxx/test/std/containers/container.adaptors/priority.queue/priqueue.cons.alloc/ctor_move_alloc.pass.cpp
    libcxx/test/std/containers/container.adaptors/priority.queue/priqueue.cons/deduct.pass.cpp
    libcxx/test/std/containers/container.adaptors/queue/queue.cons.alloc/ctor_alloc.pass.cpp
    libcxx/test/std/containers/container.adaptors/queue/queue.cons.alloc/ctor_container_alloc.pass.cpp
    libcxx/test/std/containers/container.adaptors/queue/queue.cons.alloc/ctor_queue_alloc.pass.cpp
    libcxx/test/std/containers/container.adaptors/queue/queue.cons.alloc/ctor_rcontainer_alloc.pass.cpp
    libcxx/test/std/containers/container.adaptors/queue/queue.cons.alloc/ctor_rqueue_alloc.pass.cpp
    libcxx/test/std/containers/container.adaptors/queue/queue.cons/deduct.pass.cpp
    libcxx/test/std/containers/container.adaptors/stack/stack.cons.alloc/ctor_alloc.pass.cpp
    libcxx/test/std/containers/container.adaptors/stack/stack.cons.alloc/ctor_container_alloc.pass.cpp
    libcxx/test/std/containers/container.adaptors/stack/stack.cons.alloc/ctor_copy_alloc.pass.cpp
    libcxx/test/std/containers/container.adaptors/stack/stack.cons.alloc/ctor_rcontainer_alloc.pass.cpp
    libcxx/test/std/containers/container.adaptors/stack/stack.cons.alloc/ctor_rqueue_alloc.pass.cpp
    libcxx/test/std/containers/container.adaptors/stack/stack.cons/deduct.pass.cpp
    libcxx/test/std/depr/depr.c.headers/stdlib_h.pass.cpp
    libcxx/test/std/input.output/file.streams/c.files/cstdio.pass.cpp
    libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.last_write_time/last_write_time.pass.cpp
    libcxx/test/std/input.output/iostream.format/input.streams/istream.unformatted/sync.pass.cpp
    libcxx/test/std/iterators/iterator.container/ssize.pass.cpp
    libcxx/test/std/language.support/support.dynamic/destroying_delete_t_declaration.pass.cpp
    libcxx/test/std/language.support/support.initlist/support.initlist.access/access.pass.cpp
    libcxx/test/std/language.support/support.initlist/support.initlist.range/begin_end.pass.cpp
    libcxx/test/std/language.support/support.runtime/cstdlib.pass.cpp
    libcxx/test/std/language.support/support.runtime/ctime.pass.cpp
    libcxx/test/std/localization/locale.categories/category.monetary/locale.moneypunct/money_base.pass.cpp
    libcxx/test/std/numerics/numarray/template.valarray/valarray.unary/not.pass.cpp
    libcxx/test/std/utilities/memory/allocator.traits/allocator.traits.members/construct.pass.cpp
    libcxx/test/std/utilities/memory/allocator.traits/allocator.traits.members/deallocate.pass.cpp
    libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.assign/auto_ptr_Y.pass.cpp
    libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.assign/shared_ptr.pass.cpp
    libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.assign/shared_ptr_Y.pass.cpp
    libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.assign/shared_ptr_Y_rv.pass.cpp
    libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.assign/shared_ptr_rv.pass.cpp
    libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.assign/unique_ptr_Y.pass.cpp
    libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.cast/const_pointer_cast.pass.cpp
    libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.cast/dynamic_pointer_cast.pass.cpp
    libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.cast/static_pointer_cast.pass.cpp
    libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.const/auto_ptr.pass.cpp
    libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.const/shared_ptr_Y.pass.cpp
    libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.const/shared_ptr_Y_rv.pass.cpp
    libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.const/unique_ptr.pass.cpp
    libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.const/weak_ptr.pass.cpp
    libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.mod/reset.pass.cpp
    libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.mod/reset_pointer.pass.cpp
    libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.mod/reset_pointer_deleter.pass.cpp
    libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.mod/reset_pointer_deleter_allocator.pass.cpp
    libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.weak/util.smartptr.weak.assign/shared_ptr_Y.pass.cpp
    libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.weak/util.smartptr.weak.assign/weak_ptr.pass.cpp
    libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.weak/util.smartptr.weak.assign/weak_ptr_Y.pass.cpp
    libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.weak/util.smartptr.weak.const/shared_ptr_Y.pass.cpp
    libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.weak/util.smartptr.weak.const/weak_ptr.pass.cpp
    libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.weak/util.smartptr.weak.const/weak_ptr_Y.pass.cpp
    libcxx/test/std/utilities/meta/meta.trans/meta.trans.other/result_of11.pass.cpp
    libcxx/test/std/utilities/optional/optional.object/optional.object.ctor/rvalue_T.pass.cpp
    libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.dltr/unique.ptr.dltr.dflt/convert_ctor.pass.cpp
    libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.special/eq.pass.cpp
    libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.special/rel.pass.cpp
    libcxx/test/std/utilities/template.bitset/bitset.cons/char_ptr_ctor.pass.cpp
    libcxx/test/std/utilities/template.bitset/bitset.cons/default.pass.cpp
    libcxx/test/std/utilities/template.bitset/bitset.cons/ull_ctor.pass.cpp
    libcxx/test/std/utilities/template.bitset/bitset.members/right_shift_eq.pass.cpp
    libcxx/test/std/utilities/time/date.time/ctime.pass.cpp
    libcxx/test/std/utilities/time/time.cal/time.cal.day/time.cal.day.members/ctor.pass.cpp
    libcxx/test/std/utilities/time/time.cal/time.cal.day/time.cal.day.members/decrement.pass.cpp
    libcxx/test/std/utilities/time/time.cal/time.cal.day/time.cal.day.members/increment.pass.cpp
    libcxx/test/std/utilities/time/time.cal/time.cal.day/time.cal.day.members/plus_minus_equal.pass.cpp
    libcxx/test/std/utilities/time/time.cal/time.cal.day/time.cal.day.nonmembers/literals.pass.cpp
    libcxx/test/std/utilities/time/time.cal/time.cal.month/time.cal.month.members/decrement.pass.cpp
    libcxx/test/std/utilities/time/time.cal/time.cal.month/time.cal.month.members/increment.pass.cpp
    libcxx/test/std/utilities/time/time.cal/time.cal.month/time.cal.month.members/plus_minus_equal.pass.cpp
    libcxx/test/std/utilities/time/time.cal/time.cal.year/time.cal.year.members/ctor.pass.cpp
    libcxx/test/std/utilities/time/time.cal/time.cal.year/time.cal.year.members/decrement.pass.cpp
    libcxx/test/std/utilities/time/time.cal/time.cal.year/time.cal.year.members/increment.pass.cpp
    libcxx/test/std/utilities/time/time.cal/time.cal.year/time.cal.year.members/plus_minus.pass.cpp
    libcxx/test/std/utilities/time/time.cal/time.cal.year/time.cal.year.members/plus_minus_equal.pass.cpp
    libcxx/test/std/utilities/time/time.duration/time.duration.special/max.pass.cpp
    libcxx/test/std/utilities/time/time.duration/time.duration.special/min.pass.cpp
    libcxx/test/std/utilities/time/time.duration/time.duration.special/zero.pass.cpp
    libcxx/test/std/utilities/utility/forward/move.pass.cpp
    libcxx/test/support/debug_mode_helper.h
    libcxx/test/support/filesystem_test_helper.h
    libcxx/test/support/unique_ptr_test_helper.h

Removed: 
    


################################################################################
diff  --git a/libcxx/src/filesystem/filesystem_common.h b/libcxx/src/filesystem/filesystem_common.h
index fe5c42f5e6d0..a7828ef38632 100644
--- a/libcxx/src/filesystem/filesystem_common.h
+++ b/libcxx/src/filesystem/filesystem_common.h
@@ -13,8 +13,9 @@
 #include "filesystem"
 #include "array"
 #include "chrono"
-#include "cstdlib"
 #include "climits"
+#include "cstdlib"
+#include "ctime"
 
 #include <unistd.h>
 #include <sys/stat.h>
@@ -47,7 +48,7 @@ static string format_string_imp(const char* msg, ...) {
   struct GuardVAList {
     va_list& target;
     bool active = true;
-    GuardVAList(va_list& target) : target(target), active(true) {}
+    GuardVAList(va_list& tgt) : target(tgt), active(true) {}
     void clear() {
       if (active)
         va_end(target);
@@ -134,50 +135,50 @@ path error_value<path>() {
 
 template <class T>
 struct ErrorHandler {
-  const char* func_name;
-  error_code* ec = nullptr;
-  const path* p1 = nullptr;
-  const path* p2 = nullptr;
+  const char* func_name_;
+  error_code* ec_ = nullptr;
+  const path* p1_ = nullptr;
+  const path* p2_ = nullptr;
 
   ErrorHandler(const char* fname, error_code* ec, const path* p1 = nullptr,
                const path* p2 = nullptr)
-      : func_name(fname), ec(ec), p1(p1), p2(p2) {
-    if (ec)
-      ec->clear();
+      : func_name_(fname), ec_(ec), p1_(p1), p2_(p2) {
+    if (ec_)
+      ec_->clear();
   }
 
-  T report(const error_code& m_ec) const {
-    if (ec) {
-      *ec = m_ec;
+  T report(const error_code& ec) const {
+    if (ec_) {
+      *ec_ = ec;
       return error_value<T>();
     }
-    string what = string("in ") + func_name;
-    switch (bool(p1) + bool(p2)) {
+    string what = string("in ") + func_name_;
+    switch (bool(p1_) + bool(p2_)) {
     case 0:
-      __throw_filesystem_error(what, m_ec);
+      __throw_filesystem_error(what, ec);
     case 1:
-      __throw_filesystem_error(what, *p1, m_ec);
+      __throw_filesystem_error(what, *p1_, ec);
     case 2:
-      __throw_filesystem_error(what, *p1, *p2, m_ec);
+      __throw_filesystem_error(what, *p1_, *p2_, ec);
     }
     _LIBCPP_UNREACHABLE();
   }
 
   template <class... Args>
-  T report(const error_code& m_ec, const char* msg, Args const&... args) const {
-    if (ec) {
-      *ec = m_ec;
+  T report(const error_code& ec, const char* msg, Args const&... args) const {
+    if (ec_) {
+      *ec_ = ec;
       return error_value<T>();
     }
     string what =
-        string("in ") + func_name + ": " + format_string(msg, args...);
-    switch (bool(p1) + bool(p2)) {
+        string("in ") + func_name_ + ": " + format_string(msg, args...);
+    switch (bool(p1_) + bool(p2_)) {
     case 0:
-      __throw_filesystem_error(what, m_ec);
+      __throw_filesystem_error(what, ec);
     case 1:
-      __throw_filesystem_error(what, *p1, m_ec);
+      __throw_filesystem_error(what, *p1_, ec);
     case 2:
-      __throw_filesystem_error(what, *p1, *p2, m_ec);
+      __throw_filesystem_error(what, *p1_, *p2_, ec);
     }
     _LIBCPP_UNREACHABLE();
   }
@@ -197,8 +198,8 @@ struct ErrorHandler {
 using chrono::duration;
 using chrono::duration_cast;
 
-using TimeSpec = struct ::timespec;
-using StatT = struct ::stat;
+using TimeSpec = std::timespec;
+using StatT = struct stat;
 
 template <class FileTimeT, class TimeT,
           bool IsFloat = is_floating_point<typename FileTimeT::rep>::value>

diff  --git a/libcxx/test/libcxx/containers/gnu_cxx/hash_map.pass.cpp b/libcxx/test/libcxx/containers/gnu_cxx/hash_map.pass.cpp
index 38f06a214b20..20bfd9b5eea8 100644
--- a/libcxx/test/libcxx/containers/gnu_cxx/hash_map.pass.cpp
+++ b/libcxx/test/libcxx/containers/gnu_cxx/hash_map.pass.cpp
@@ -6,12 +6,9 @@
 //
 //===----------------------------------------------------------------------===//
 
-// Prevent emission of the deprecated warning.
-#ifdef __clang__
-#pragma clang diagnostic ignored "-W#warnings"
-#endif
-#ifdef __GNUC__
-#pragma GCC diagnostic ignored "-Wcpp"
+// Prevent <ext/hash_map> from generating deprecated warnings for this test.
+#if defined(__DEPRECATED)
+#   undef __DEPRECATED
 #endif
 
 #include <ext/hash_map>

diff  --git a/libcxx/test/libcxx/containers/gnu_cxx/hash_map_name_lookup.pass.cpp b/libcxx/test/libcxx/containers/gnu_cxx/hash_map_name_lookup.pass.cpp
index 31e877eda822..a88a219a9af3 100644
--- a/libcxx/test/libcxx/containers/gnu_cxx/hash_map_name_lookup.pass.cpp
+++ b/libcxx/test/libcxx/containers/gnu_cxx/hash_map_name_lookup.pass.cpp
@@ -6,20 +6,18 @@
 //
 //===----------------------------------------------------------------------===//
 
-// Prevent emission of the deprecated warning.
-#ifdef __clang__
-#pragma clang diagnostic ignored "-W#warnings"
-#endif
-#ifdef __GNUC__
-#pragma GCC diagnostic push "-Wcpp"
-#endif
-
 // Poison the std:: names we might use inside __gnu_cxx to ensure they're
 // properly qualified.
 struct allocator;
 struct pair;
 struct equal_to;
 struct unique_ptr;
+
+// Prevent <ext/hash_map> from generating deprecated warnings for this test.
+#if defined(__DEPRECATED)
+#   undef __DEPRECATED
+#endif
+
 #include <ext/hash_map>
 
 #include "test_macros.h"

diff  --git a/libcxx/test/libcxx/containers/gnu_cxx/hash_set.pass.cpp b/libcxx/test/libcxx/containers/gnu_cxx/hash_set.pass.cpp
index eb982cca048c..c5c37af53983 100644
--- a/libcxx/test/libcxx/containers/gnu_cxx/hash_set.pass.cpp
+++ b/libcxx/test/libcxx/containers/gnu_cxx/hash_set.pass.cpp
@@ -6,12 +6,9 @@
 //
 //===----------------------------------------------------------------------===//
 
-// Prevent emission of the deprecated warning.
-#ifdef __clang__
-#pragma clang diagnostic ignored "-W#warnings"
-#endif
-#ifdef __GNUC__
-#pragma GCC diagnostic ignored "-Wcpp"
+// Prevent <ext/hash_set> from generating deprecated warnings for this test.
+#if defined(__DEPRECATED)
+#   undef __DEPRECATED
 #endif
 
 #include <ext/hash_set>

diff  --git a/libcxx/test/libcxx/containers/gnu_cxx/hash_set_name_lookup.pass.cpp b/libcxx/test/libcxx/containers/gnu_cxx/hash_set_name_lookup.pass.cpp
index 6e50137ceb71..83283dc1dc29 100644
--- a/libcxx/test/libcxx/containers/gnu_cxx/hash_set_name_lookup.pass.cpp
+++ b/libcxx/test/libcxx/containers/gnu_cxx/hash_set_name_lookup.pass.cpp
@@ -6,20 +6,18 @@
 //
 //===----------------------------------------------------------------------===//
 
-// Prevent emission of the deprecated warning.
-#ifdef __clang__
-#pragma clang diagnostic ignored "-W#warnings"
-#endif
-#ifdef __GNUC__
-#pragma GCC diagnostic ignored "-Wcpp"
-#endif
-
 // Poison the std:: names we might use inside __gnu_cxx to ensure they're
 // properly qualified.
 struct allocator;
 struct pair;
 struct equal_to;
 struct unique_ptr;
+
+// Prevent <ext/hash_set> from generating deprecated warnings for this test.
+#if defined(__DEPRECATED)
+#   undef __DEPRECATED
+#endif
+
 #include <ext/hash_set>
 
 #include "test_macros.h"

diff  --git a/libcxx/test/libcxx/containers/sequences/deque/spare_block_handling.pass.cpp b/libcxx/test/libcxx/containers/sequences/deque/spare_block_handling.pass.cpp
index 6b4fcfcb1cf8..3b90464b7297 100644
--- a/libcxx/test/libcxx/containers/sequences/deque/spare_block_handling.pass.cpp
+++ b/libcxx/test/libcxx/containers/sequences/deque/spare_block_handling.pass.cpp
@@ -53,18 +53,18 @@ static_assert(BlockSize<LargeT>::value == 16, "");
 
 const auto& AllocBytes = malloc_allocator_base::outstanding_bytes;
 
-template <class DT>
+template <class Deque>
 struct PrintOnFailure {
-   explicit PrintOnFailure(DT const& d) : d(&d) {}
+   explicit PrintOnFailure(Deque const& deque) : deque_(&deque) {}
 
   ~PrintOnFailure() {
     if (::rapid_cxx_test::get_reporter().current_failure().type
         != ::rapid_cxx_test::failure_type::none) {
-      print(*d);
+      print(*deque_);
     }
   }
 private:
-  const DT* d;
+  const Deque* deque_;
 
   PrintOnFailure(PrintOnFailure const&) = delete;
 };

diff  --git a/libcxx/test/libcxx/include_as_c.sh.cpp b/libcxx/test/libcxx/include_as_c.sh.cpp
index 04b044bee875..60e0a26ed576 100644
--- a/libcxx/test/libcxx/include_as_c.sh.cpp
+++ b/libcxx/test/libcxx/include_as_c.sh.cpp
@@ -10,6 +10,10 @@
 // We're building as C, so this test doesn't work when building with modules.
 // UNSUPPORTED: -fmodules
 
+// GCC complains about unrecognized arguments because we're compiling the
+// file as C, but we're passing C++ flags on the command-line.
+// UNSUPPORTED: gcc
+
 // Test that the C wrapper headers can be included when compiling them as C.
 
 // NOTE: It's not common or recommended to have libc++ in the header search

diff  --git a/libcxx/test/std/algorithms/alg.nonmodifying/alg.search/search.pass.cpp b/libcxx/test/std/algorithms/alg.nonmodifying/alg.search/search.pass.cpp
index cb1bd1cf40e9..b4b841f273c4 100644
--- a/libcxx/test/std/algorithms/alg.nonmodifying/alg.search/search.pass.cpp
+++ b/libcxx/test/std/algorithms/alg.nonmodifying/alg.search/search.pass.cpp
@@ -58,12 +58,12 @@ struct MySearcher {
 
 namespace User {
 struct S {
-    S(int x) : x(x) {}
-    int x;
+    S(int x) : x_(x) {}
+    int x_;
 };
 bool operator==(S lhs, S rhs)
 {
-    return lhs.x == rhs.x;
+    return lhs.x_ == rhs.x_;
 }
 template <class T, class U>
 void make_pair(T&&, U&&) = delete;

diff  --git a/libcxx/test/std/containers/container.adaptors/priority.queue/priqueue.cons.alloc/ctor_alloc.pass.cpp b/libcxx/test/std/containers/container.adaptors/priority.queue/priqueue.cons.alloc/ctor_alloc.pass.cpp
index 59547203b49b..07b4f46e65de 100644
--- a/libcxx/test/std/containers/container.adaptors/priority.queue/priqueue.cons.alloc/ctor_alloc.pass.cpp
+++ b/libcxx/test/std/containers/container.adaptors/priority.queue/priqueue.cons.alloc/ctor_alloc.pass.cpp
@@ -28,11 +28,11 @@ struct test
     explicit test(const test_allocator<int>& a) : base(a) {}
     test(const value_compare& comp, const test_allocator<int>& a)
         : base(comp, c, a) {}
-    test(const value_compare& comp, const container_type& c,
-        const test_allocator<int>& a) : base(comp, c, a) {}
+    test(const value_compare& comp, const container_type& container,
+        const test_allocator<int>& a) : base(comp, container, a) {}
 #if TEST_STD_VER >= 11
-    test(const value_compare& comp, container_type&& c,
-         const test_allocator<int>& a) : base(comp, std::move(c), a) {}
+    test(const value_compare& comp, container_type&& container,
+         const test_allocator<int>& a) : base(comp, std::move(container), a) {}
     test(test&& q, const test_allocator<int>& a) : base(std::move(q), a) {}
 #endif
     test_allocator<int> get_allocator() {return c.get_allocator();}

diff  --git a/libcxx/test/std/containers/container.adaptors/priority.queue/priqueue.cons.alloc/ctor_comp_alloc.pass.cpp b/libcxx/test/std/containers/container.adaptors/priority.queue/priqueue.cons.alloc/ctor_comp_alloc.pass.cpp
index 40f6bc473c7a..87b9ada9b703 100644
--- a/libcxx/test/std/containers/container.adaptors/priority.queue/priqueue.cons.alloc/ctor_comp_alloc.pass.cpp
+++ b/libcxx/test/std/containers/container.adaptors/priority.queue/priqueue.cons.alloc/ctor_comp_alloc.pass.cpp
@@ -26,13 +26,13 @@ struct test
     typedef typename base::value_compare value_compare;
 
     explicit test(const test_allocator<int>& a) : base(a) {}
-    test(const value_compare& comp, const test_allocator<int>& a)
-        : base(comp, a) {}
-    test(const value_compare& comp, const container_type& c,
-        const test_allocator<int>& a) : base(comp, c, a) {}
+    test(const value_compare& compare, const test_allocator<int>& a)
+        : base(compare, a) {}
+    test(const value_compare& compare, const container_type& container,
+        const test_allocator<int>& a) : base(compare, container, a) {}
 #if TEST_STD_VER >= 11
-    test(const value_compare& comp, container_type&& c,
-         const test_allocator<int>& a) : base(comp, std::move(c), a) {}
+    test(const value_compare& compare, container_type&& container,
+         const test_allocator<int>& a) : base(compare, std::move(container), a) {}
     test(test&& q, const test_allocator<int>& a) : base(std::move(q), a) {}
 #endif
     test_allocator<int> get_allocator() {return c.get_allocator();}

diff  --git a/libcxx/test/std/containers/container.adaptors/priority.queue/priqueue.cons.alloc/ctor_comp_cont_alloc.pass.cpp b/libcxx/test/std/containers/container.adaptors/priority.queue/priqueue.cons.alloc/ctor_comp_cont_alloc.pass.cpp
index 1f3dd7fbd167..afec77139679 100644
--- a/libcxx/test/std/containers/container.adaptors/priority.queue/priqueue.cons.alloc/ctor_comp_cont_alloc.pass.cpp
+++ b/libcxx/test/std/containers/container.adaptors/priority.queue/priqueue.cons.alloc/ctor_comp_cont_alloc.pass.cpp
@@ -37,13 +37,13 @@ struct test
     typedef typename base::value_compare value_compare;
 
     explicit test(const test_allocator<int>& a) : base(a) {}
-    test(const value_compare& comp, const test_allocator<int>& a)
-        : base(comp, a) {}
-    test(const value_compare& comp, const container_type& c,
-        const test_allocator<int>& a) : base(comp, c, a) {}
+    test(const value_compare& compare, const test_allocator<int>& a)
+        : base(compare, a) {}
+    test(const value_compare& compare, const container_type& container,
+        const test_allocator<int>& a) : base(compare, container, a) {}
 #if TEST_STD_VER >= 11 // testing rvalue constructor
-    test(const value_compare& comp, container_type&& c,
-         const test_allocator<int>& a) : base(comp, std::move(c), a) {}
+    test(const value_compare& compare, container_type&& container,
+         const test_allocator<int>& a) : base(compare, std::move(container), a) {}
     test(test&& q, const test_allocator<int>& a) : base(std::move(q), a) {}
 #endif
     test_allocator<int> get_allocator() {return c.get_allocator();}

diff  --git a/libcxx/test/std/containers/container.adaptors/priority.queue/priqueue.cons.alloc/ctor_comp_rcont_alloc.pass.cpp b/libcxx/test/std/containers/container.adaptors/priority.queue/priqueue.cons.alloc/ctor_comp_rcont_alloc.pass.cpp
index 3956f9b974e6..7ddb5f4d5a3c 100644
--- a/libcxx/test/std/containers/container.adaptors/priority.queue/priqueue.cons.alloc/ctor_comp_rcont_alloc.pass.cpp
+++ b/libcxx/test/std/containers/container.adaptors/priority.queue/priqueue.cons.alloc/ctor_comp_rcont_alloc.pass.cpp
@@ -37,13 +37,13 @@ struct test
     typedef typename base::value_compare value_compare;
 
     explicit test(const test_allocator<int>& a) : base(a) {}
-    test(const value_compare& comp, const test_allocator<int>& a)
-        : base(comp, a) {}
-    test(const value_compare& comp, const container_type& c,
-        const test_allocator<int>& a) : base(comp, c, a) {}
+    test(const value_compare& compare, const test_allocator<int>& a)
+        : base(compare, a) {}
+    test(const value_compare& compare, const container_type& container,
+        const test_allocator<int>& a) : base(compare, container, a) {}
 #if TEST_STD_VER >= 11 // testing rvalue ctor
-    test(const value_compare& comp, container_type&& c,
-         const test_allocator<int>& a) : base(comp, std::move(c), a) {}
+    test(const value_compare& compare, container_type&& container,
+         const test_allocator<int>& a) : base(compare, std::move(container), a) {}
     test(test&& q, const test_allocator<int>& a) : base(std::move(q), a) {}
 #endif
     test_allocator<int> get_allocator() {return c.get_allocator();}

diff  --git a/libcxx/test/std/containers/container.adaptors/priority.queue/priqueue.cons.alloc/ctor_copy_alloc.pass.cpp b/libcxx/test/std/containers/container.adaptors/priority.queue/priqueue.cons.alloc/ctor_copy_alloc.pass.cpp
index 152030ff5546..77c9989e91c5 100644
--- a/libcxx/test/std/containers/container.adaptors/priority.queue/priqueue.cons.alloc/ctor_copy_alloc.pass.cpp
+++ b/libcxx/test/std/containers/container.adaptors/priority.queue/priqueue.cons.alloc/ctor_copy_alloc.pass.cpp
@@ -36,10 +36,10 @@ struct test
     typedef typename base::value_compare value_compare;
 
     explicit test(const test_allocator<int>& a) : base(a) {}
-    test(const value_compare& comp, const test_allocator<int>& a)
-        : base(comp, c, a) {}
-    test(const value_compare& comp, const container_type& c,
-         const test_allocator<int>& a) : base(comp, c, a) {}
+    test(const value_compare& compare, const test_allocator<int>& a)
+        : base(compare, c, a) {}
+    test(const value_compare& compare, const container_type& container,
+         const test_allocator<int>& a) : base(compare, container, a) {}
     test(const test& q, const test_allocator<int>& a) : base(q, a) {}
     test_allocator<int> get_allocator() {return c.get_allocator();}
 

diff  --git a/libcxx/test/std/containers/container.adaptors/priority.queue/priqueue.cons.alloc/ctor_move_alloc.pass.cpp b/libcxx/test/std/containers/container.adaptors/priority.queue/priqueue.cons.alloc/ctor_move_alloc.pass.cpp
index a707946fa0d1..c1c05808606a 100644
--- a/libcxx/test/std/containers/container.adaptors/priority.queue/priqueue.cons.alloc/ctor_move_alloc.pass.cpp
+++ b/libcxx/test/std/containers/container.adaptors/priority.queue/priqueue.cons.alloc/ctor_move_alloc.pass.cpp
@@ -41,12 +41,12 @@ struct test
     typedef typename base::value_compare value_compare;
 
     explicit test(const test_allocator<int>& a) : base(a) {}
-    test(const value_compare& comp, const test_allocator<int>& a)
-        : base(comp, c, a) {}
-    test(const value_compare& comp, const container_type& c,
-        const test_allocator<int>& a) : base(comp, c, a) {}
-    test(const value_compare& comp, container_type&& c,
-         const test_allocator<int>& a) : base(comp, std::move(c), a) {}
+    test(const value_compare& compare, const test_allocator<int>& a)
+        : base(compare, c, a) {}
+    test(const value_compare& compare, const container_type& container,
+        const test_allocator<int>& a) : base(compare, container, a) {}
+    test(const value_compare& compare, container_type&& container,
+         const test_allocator<int>& a) : base(compare, std::move(container), a) {}
     test(test&& q, const test_allocator<int>& a) : base(std::move(q), a) {}
     test_allocator<int> get_allocator() {return c.get_allocator();}
 

diff  --git a/libcxx/test/std/containers/container.adaptors/priority.queue/priqueue.cons/deduct.pass.cpp b/libcxx/test/std/containers/container.adaptors/priority.queue/priqueue.cons/deduct.pass.cpp
index bc01a8af37f3..c4f5375bad45 100644
--- a/libcxx/test/std/containers/container.adaptors/priority.queue/priqueue.cons/deduct.pass.cpp
+++ b/libcxx/test/std/containers/container.adaptors/priority.queue/priqueue.cons/deduct.pass.cpp
@@ -108,12 +108,12 @@ int main(int, char**)
 //  has to match the type of the one used by the underlying container
     typedef long double T;
     typedef std::greater<T> Comp;
-    typedef test_allocator<T> A;
-    typedef std::deque<T, A> Cont;
+    typedef test_allocator<T> Alloc;
+    typedef std::deque<T, Alloc> Cont;
 
     Cont c{2,3,0,1};
     std::priority_queue<T, Cont, Comp> source(Comp(), c);
-    std::priority_queue pri(source, A(2)); // queue(queue &, allocator)
+    std::priority_queue pri(source, Alloc(2)); // queue(queue &, allocator)
     static_assert(std::is_same_v<decltype(pri)::value_type, T>, "");
     static_assert(std::is_same_v<decltype(pri)::container_type, Cont>, "");
     assert(pri.size() == 4);

diff  --git a/libcxx/test/std/containers/container.adaptors/queue/queue.cons.alloc/ctor_alloc.pass.cpp b/libcxx/test/std/containers/container.adaptors/queue/queue.cons.alloc/ctor_alloc.pass.cpp
index 8d916f767718..197256051dc3 100644
--- a/libcxx/test/std/containers/container.adaptors/queue/queue.cons.alloc/ctor_alloc.pass.cpp
+++ b/libcxx/test/std/containers/container.adaptors/queue/queue.cons.alloc/ctor_alloc.pass.cpp
@@ -23,9 +23,9 @@ struct test
     typedef std::queue<int, std::deque<int, test_allocator<int> > > base;
 
     explicit test(const test_allocator<int>& a) : base(a) {}
-    test(const container_type& c, const test_allocator<int>& a) : base(c, a) {}
+    test(const container_type& container, const test_allocator<int>& a) : base(container, a) {}
 #if TEST_STD_VER >= 11
-    test(container_type&& c, const test_allocator<int>& a) : base(std::move(c), a) {}
+    test(container_type&& container, const test_allocator<int>& a) : base(std::move(container), a) {}
     test(test&& q, const test_allocator<int>& a) : base(std::move(q), a) {}
 #endif
     test_allocator<int> get_allocator() {return c.get_allocator();}

diff  --git a/libcxx/test/std/containers/container.adaptors/queue/queue.cons.alloc/ctor_container_alloc.pass.cpp b/libcxx/test/std/containers/container.adaptors/queue/queue.cons.alloc/ctor_container_alloc.pass.cpp
index 56272064fc22..674fc6c243f0 100644
--- a/libcxx/test/std/containers/container.adaptors/queue/queue.cons.alloc/ctor_container_alloc.pass.cpp
+++ b/libcxx/test/std/containers/container.adaptors/queue/queue.cons.alloc/ctor_container_alloc.pass.cpp
@@ -36,9 +36,9 @@ struct test
     typedef std::queue<int, C> base;
 
     explicit test(const test_allocator<int>& a) : base(a) {}
-    test(const container_type& c, const test_allocator<int>& a) : base(c, a) {}
+    test(const container_type& container, const test_allocator<int>& a) : base(container, a) {}
 #if TEST_STD_VER >= 11
-    test(container_type&& c, const test_allocator<int>& a) : base(std::move(c), a) {}
+    test(container_type&& container, const test_allocator<int>& a) : base(std::move(container), a) {}
     test(test&& q, const test_allocator<int>& a) : base(std::move(q), a) {}
 #endif
     test_allocator<int> get_allocator() {return c.get_allocator();}

diff  --git a/libcxx/test/std/containers/container.adaptors/queue/queue.cons.alloc/ctor_queue_alloc.pass.cpp b/libcxx/test/std/containers/container.adaptors/queue/queue.cons.alloc/ctor_queue_alloc.pass.cpp
index 38ba6f7c4a7c..a9107f25822d 100644
--- a/libcxx/test/std/containers/container.adaptors/queue/queue.cons.alloc/ctor_queue_alloc.pass.cpp
+++ b/libcxx/test/std/containers/container.adaptors/queue/queue.cons.alloc/ctor_queue_alloc.pass.cpp
@@ -38,7 +38,7 @@ struct test
     typedef typename base::container_type container_type;
 
     explicit test(const allocator_type& a) : base(a) {}
-    test(const container_type& c, const allocator_type& a) : base(c, a) {}
+    test(const container_type& container, const allocator_type& a) : base(container, a) {}
     test(const test& q, const allocator_type& a) : base(q, a) {}
     allocator_type get_allocator() {return this->c.get_allocator();}
 };

diff  --git a/libcxx/test/std/containers/container.adaptors/queue/queue.cons.alloc/ctor_rcontainer_alloc.pass.cpp b/libcxx/test/std/containers/container.adaptors/queue/queue.cons.alloc/ctor_rcontainer_alloc.pass.cpp
index 8c6b88a651b8..5e78c33df8bb 100644
--- a/libcxx/test/std/containers/container.adaptors/queue/queue.cons.alloc/ctor_rcontainer_alloc.pass.cpp
+++ b/libcxx/test/std/containers/container.adaptors/queue/queue.cons.alloc/ctor_rcontainer_alloc.pass.cpp
@@ -42,8 +42,8 @@ struct test
     typedef typename base::container_type container_type;
 
     explicit test(const allocator_type& a) : base(a) {}
-    test(const container_type& c, const allocator_type& a) : base(c, a) {}
-    test(container_type&& c, const allocator_type& a) : base(std::move(c), a) {}
+    test(const container_type& container, const allocator_type& a) : base(container, a) {}
+    test(container_type&& container, const allocator_type& a) : base(std::move(container), a) {}
     test(test&& q, const allocator_type& a) : base(std::move(q), a) {}
     allocator_type get_allocator() {return this->c.get_allocator();}
 };

diff  --git a/libcxx/test/std/containers/container.adaptors/queue/queue.cons.alloc/ctor_rqueue_alloc.pass.cpp b/libcxx/test/std/containers/container.adaptors/queue/queue.cons.alloc/ctor_rqueue_alloc.pass.cpp
index b19538394536..b0604ced6163 100644
--- a/libcxx/test/std/containers/container.adaptors/queue/queue.cons.alloc/ctor_rqueue_alloc.pass.cpp
+++ b/libcxx/test/std/containers/container.adaptors/queue/queue.cons.alloc/ctor_rqueue_alloc.pass.cpp
@@ -42,8 +42,8 @@ struct test
     typedef typename base::container_type container_type;
 
     explicit test(const allocator_type& a) : base(a) {}
-    test(const container_type& c, const allocator_type& a) : base(c, a) {}
-    test(container_type&& c, const allocator_type& a) : base(std::move(c), a) {}
+    test(const container_type& container, const allocator_type& a) : base(container, a) {}
+    test(container_type&& container, const allocator_type& a) : base(std::move(container), a) {}
     test(test&& q, const allocator_type& a) : base(std::move(q), a) {}
     allocator_type get_allocator() {return this->c.get_allocator();}
 };

diff  --git a/libcxx/test/std/containers/container.adaptors/queue/queue.cons/deduct.pass.cpp b/libcxx/test/std/containers/container.adaptors/queue/queue.cons/deduct.pass.cpp
index 484aa51b5d9f..738a3a170163 100644
--- a/libcxx/test/std/containers/container.adaptors/queue/queue.cons/deduct.pass.cpp
+++ b/libcxx/test/std/containers/container.adaptors/queue/queue.cons/deduct.pass.cpp
@@ -75,14 +75,14 @@ int main(int, char**)
 //  This one is odd - you can pass an allocator in to use, but the allocator
 //  has to match the type of the one used by the underlying container
     typedef short T;
-    typedef test_allocator<T> A;
-    typedef std::deque<T, A> C;
+    typedef test_allocator<T> Alloc;
+    typedef std::deque<T, Alloc> Container;
 
-    C c{0,1,2,3};
-    std::queue<T, C> source(c);
-    std::queue que(source, A(2)); // queue(queue &, allocator)
+    Container c{0,1,2,3};
+    std::queue<T, Container> source(c);
+    std::queue que(source, Alloc(2)); // queue(queue &, allocator)
     static_assert(std::is_same_v<decltype(que)::value_type, T>, "");
-    static_assert(std::is_same_v<decltype(que)::container_type, C>, "");
+    static_assert(std::is_same_v<decltype(que)::container_type, Container>, "");
     assert(que.size() == 4);
     assert(que.back() == 3);
     }

diff  --git a/libcxx/test/std/containers/container.adaptors/stack/stack.cons.alloc/ctor_alloc.pass.cpp b/libcxx/test/std/containers/container.adaptors/stack/stack.cons.alloc/ctor_alloc.pass.cpp
index 9fb09b158dfb..8ec90a50aa80 100644
--- a/libcxx/test/std/containers/container.adaptors/stack/stack.cons.alloc/ctor_alloc.pass.cpp
+++ b/libcxx/test/std/containers/container.adaptors/stack/stack.cons.alloc/ctor_alloc.pass.cpp
@@ -23,9 +23,9 @@ struct test
     typedef std::stack<int, std::deque<int, test_allocator<int> > > base;
 
     explicit test(const test_allocator<int>& a) : base(a) {}
-    test(const container_type& c, const test_allocator<int>& a) : base(c, a) {}
+    test(const container_type& cont, const test_allocator<int>& a) : base(cont, a) {}
 #if TEST_STD_VER >= 11
-    test(container_type&& c, const test_allocator<int>& a) : base(std::move(c), a) {}
+    test(container_type&& cont, const test_allocator<int>& a) : base(std::move(cont), a) {}
     test(test&& q, const test_allocator<int>& a) : base(std::move(q), a) {}
 #endif
     test_allocator<int> get_allocator() {return c.get_allocator();}

diff  --git a/libcxx/test/std/containers/container.adaptors/stack/stack.cons.alloc/ctor_container_alloc.pass.cpp b/libcxx/test/std/containers/container.adaptors/stack/stack.cons.alloc/ctor_container_alloc.pass.cpp
index b0c6f4fcac79..05e48eecb6ad 100644
--- a/libcxx/test/std/containers/container.adaptors/stack/stack.cons.alloc/ctor_container_alloc.pass.cpp
+++ b/libcxx/test/std/containers/container.adaptors/stack/stack.cons.alloc/ctor_container_alloc.pass.cpp
@@ -36,9 +36,9 @@ struct test
     typedef std::stack<int, C> base;
 
     explicit test(const test_allocator<int>& a) : base(a) {}
-    test(const container_type& c, const test_allocator<int>& a) : base(c, a) {}
+    test(const container_type& cont, const test_allocator<int>& a) : base(cont, a) {}
 #if TEST_STD_VER >= 11
-    test(container_type&& c, const test_allocator<int>& a) : base(std::move(c), a) {}
+    test(container_type&& cont, const test_allocator<int>& a) : base(std::move(cont), a) {}
     test(test&& q, const test_allocator<int>& a) : base(std::move(q), a) {}
 #endif
     test_allocator<int> get_allocator() {return c.get_allocator();}

diff  --git a/libcxx/test/std/containers/container.adaptors/stack/stack.cons.alloc/ctor_copy_alloc.pass.cpp b/libcxx/test/std/containers/container.adaptors/stack/stack.cons.alloc/ctor_copy_alloc.pass.cpp
index 1ca3cdbaa2d5..499a3fd2cbf4 100644
--- a/libcxx/test/std/containers/container.adaptors/stack/stack.cons.alloc/ctor_copy_alloc.pass.cpp
+++ b/libcxx/test/std/containers/container.adaptors/stack/stack.cons.alloc/ctor_copy_alloc.pass.cpp
@@ -38,7 +38,7 @@ struct test
     typedef typename base::container_type container_type;
 
     explicit test(const allocator_type& a) : base(a) {}
-    test(const container_type& c, const allocator_type& a) : base(c, a) {}
+    test(const container_type& cont, const allocator_type& a) : base(cont, a) {}
     test(const test& q, const allocator_type& a) : base(q, a) {}
     allocator_type get_allocator() {return this->c.get_allocator();}
 };

diff  --git a/libcxx/test/std/containers/container.adaptors/stack/stack.cons.alloc/ctor_rcontainer_alloc.pass.cpp b/libcxx/test/std/containers/container.adaptors/stack/stack.cons.alloc/ctor_rcontainer_alloc.pass.cpp
index d975983edd0b..eb3a1ac1bf67 100644
--- a/libcxx/test/std/containers/container.adaptors/stack/stack.cons.alloc/ctor_rcontainer_alloc.pass.cpp
+++ b/libcxx/test/std/containers/container.adaptors/stack/stack.cons.alloc/ctor_rcontainer_alloc.pass.cpp
@@ -42,8 +42,8 @@ struct test
     typedef typename base::container_type container_type;
 
     explicit test(const allocator_type& a) : base(a) {}
-    test(const container_type& c, const allocator_type& a) : base(c, a) {}
-    test(container_type&& c, const allocator_type& a) : base(std::move(c), a) {}
+    test(const container_type& cont, const allocator_type& a) : base(cont, a) {}
+    test(container_type&& cont, const allocator_type& a) : base(std::move(cont), a) {}
     test(test&& q, const allocator_type& a) : base(std::move(q), a) {}
     allocator_type get_allocator() {return this->c.get_allocator();}
 };

diff  --git a/libcxx/test/std/containers/container.adaptors/stack/stack.cons.alloc/ctor_rqueue_alloc.pass.cpp b/libcxx/test/std/containers/container.adaptors/stack/stack.cons.alloc/ctor_rqueue_alloc.pass.cpp
index 7d9d84a6dcdb..849ad046898a 100644
--- a/libcxx/test/std/containers/container.adaptors/stack/stack.cons.alloc/ctor_rqueue_alloc.pass.cpp
+++ b/libcxx/test/std/containers/container.adaptors/stack/stack.cons.alloc/ctor_rqueue_alloc.pass.cpp
@@ -42,8 +42,8 @@ struct test
     typedef typename base::container_type container_type;
 
     explicit test(const allocator_type& a) : base(a) {}
-    test(const container_type& c, const allocator_type& a) : base(c, a) {}
-    test(container_type&& c, const allocator_type& a) : base(std::move(c), a) {}
+    test(const container_type& cont, const allocator_type& a) : base(cont, a) {}
+    test(container_type&& cont, const allocator_type& a) : base(std::move(cont), a) {}
     test(test&& q, const allocator_type& a) : base(std::move(q), a) {}
     allocator_type get_allocator() {return this->c.get_allocator();}
 };

diff  --git a/libcxx/test/std/containers/container.adaptors/stack/stack.cons/deduct.pass.cpp b/libcxx/test/std/containers/container.adaptors/stack/stack.cons/deduct.pass.cpp
index 5769d9210b35..fb211f6570d7 100644
--- a/libcxx/test/std/containers/container.adaptors/stack/stack.cons/deduct.pass.cpp
+++ b/libcxx/test/std/containers/container.adaptors/stack/stack.cons/deduct.pass.cpp
@@ -78,14 +78,14 @@ int main(int, char**)
 //  This one is odd - you can pass an allocator in to use, but the allocator
 //  has to match the type of the one used by the underlying container
     typedef short T;
-    typedef test_allocator<T> A;
-    typedef std::deque<T, A> C;
+    typedef test_allocator<T> Alloc;
+    typedef std::deque<T, Alloc> Container;
 
-    C c{0,1,2,3};
-    std::stack<T, C> source(c);
-    std::stack stk(source, A(2)); // stack(stack &, allocator)
+    Container c{0,1,2,3};
+    std::stack<T, Container> source(c);
+    std::stack stk(source, Alloc(2)); // stack(stack &, allocator)
     static_assert(std::is_same_v<decltype(stk)::value_type, T>, "");
-    static_assert(std::is_same_v<decltype(stk)::container_type, C>, "");
+    static_assert(std::is_same_v<decltype(stk)::container_type, Container>, "");
     assert(stk.size() == 4);
     assert(stk.top() == 3);
     }

diff  --git a/libcxx/test/std/depr/depr.c.headers/stdlib_h.pass.cpp b/libcxx/test/std/depr/depr.c.headers/stdlib_h.pass.cpp
index be436475b9b6..295f51807d41 100644
--- a/libcxx/test/std/depr/depr.c.headers/stdlib_h.pass.cpp
+++ b/libcxx/test/std/depr/depr.c.headers/stdlib_h.pass.cpp
@@ -137,18 +137,21 @@ int main(int, char**)
                   "");
 #endif
 
+    void* pv = 0;
+    void (*handler)() = 0;
+    int (*comp)(void const*, void const*) = 0;
     static_assert((std::is_same<decltype(calloc(0,0)), void*>::value), "");
     static_assert((std::is_same<decltype(free(0)), void>::value), "");
     static_assert((std::is_same<decltype(malloc(0)), void*>::value), "");
     static_assert((std::is_same<decltype(realloc(0,0)), void*>::value), "");
     static_assert((std::is_same<decltype(abort()), void>::value), "");
-    static_assert((std::is_same<decltype(atexit(0)), int>::value), "");
+    static_assert((std::is_same<decltype(atexit(handler)), int>::value), "");
     static_assert((std::is_same<decltype(exit(0)), void>::value), "");
     static_assert((std::is_same<decltype(_Exit(0)), void>::value), "");
     static_assert((std::is_same<decltype(getenv("")), char*>::value), "");
     static_assert((std::is_same<decltype(system("")), int>::value), "");
-    static_assert((std::is_same<decltype(bsearch(0,0,0,0,0)), void*>::value), "");
-    static_assert((std::is_same<decltype(qsort(0,0,0,0)), void>::value), "");
+    static_assert((std::is_same<decltype(bsearch(pv,pv,0,0,comp)), void*>::value), "");
+    static_assert((std::is_same<decltype(qsort(pv,0,0,comp)), void>::value), "");
     static_assert((std::is_same<decltype(abs(0)), int>::value), "");
     static_assert((std::is_same<decltype(labs((long)0)), long>::value), "");
     static_assert((std::is_same<decltype(llabs((long long)0)), long long>::value), "");

diff  --git a/libcxx/test/std/input.output/file.streams/c.files/cstdio.pass.cpp b/libcxx/test/std/input.output/file.streams/c.files/cstdio.pass.cpp
index bae82fec69b0..f38838681952 100644
--- a/libcxx/test/std/input.output/file.streams/c.files/cstdio.pass.cpp
+++ b/libcxx/test/std/input.output/file.streams/c.files/cstdio.pass.cpp
@@ -92,25 +92,27 @@ int main(int, char**)
     std::size_t s = 0;
     char* cp = 0;
     std::va_list va;
+    void const* vp = 0;
     ((void)fp); // Prevent unused warning
     ((void)fpos); // Prevent unused warning
     ((void)s); // Prevent unused warning
     ((void)cp); // Prevent unused warning
     ((void)va); // Prevent unused warning
+    ((void)vp); // Prevent unused warning
     static_assert((std::is_same<decltype(std::fclose(fp)), int>::value), "");
     static_assert((std::is_same<decltype(std::fflush(fp)), int>::value), "");
     static_assert((std::is_same<decltype(std::setbuf(fp,cp)), void>::value), "");
-    static_assert((std::is_same<decltype(std::vfprintf(fp,"",va)), int>::value), "");
+    static_assert((std::is_same<decltype(std::vfprintf(fp," ",va)), int>::value), "");
     static_assert((std::is_same<decltype(std::fprintf(fp," ")), int>::value), "");
-    static_assert((std::is_same<decltype(std::fscanf(fp,"")), int>::value), "");
+    static_assert((std::is_same<decltype(std::fscanf(fp," ")), int>::value), "");
     static_assert((std::is_same<decltype(std::snprintf(cp,0," ")), int>::value), "");
     static_assert((std::is_same<decltype(std::sprintf(cp," ")), int>::value), "");
-    static_assert((std::is_same<decltype(std::sscanf("","")), int>::value), "");
-    static_assert((std::is_same<decltype(std::vfprintf(fp,"",va)), int>::value), "");
-    static_assert((std::is_same<decltype(std::vfscanf(fp,"",va)), int>::value), "");
+    static_assert((std::is_same<decltype(std::sscanf(""," ")), int>::value), "");
+    static_assert((std::is_same<decltype(std::vfprintf(fp," ",va)), int>::value), "");
+    static_assert((std::is_same<decltype(std::vfscanf(fp," ",va)), int>::value), "");
     static_assert((std::is_same<decltype(std::vsnprintf(cp,0," ",va)), int>::value), "");
     static_assert((std::is_same<decltype(std::vsprintf(cp," ",va)), int>::value), "");
-    static_assert((std::is_same<decltype(std::vsscanf("","",va)), int>::value), "");
+    static_assert((std::is_same<decltype(std::vsscanf(""," ",va)), int>::value), "");
     static_assert((std::is_same<decltype(std::fgetc(fp)), int>::value), "");
     static_assert((std::is_same<decltype(std::fgets(cp,0,fp)), char*>::value), "");
     static_assert((std::is_same<decltype(std::fputc(0,fp)), int>::value), "");
@@ -119,7 +121,7 @@ int main(int, char**)
     static_assert((std::is_same<decltype(std::putc(0,fp)), int>::value), "");
     static_assert((std::is_same<decltype(std::ungetc(0,fp)), int>::value), "");
     static_assert((std::is_same<decltype(std::fread((void*)0,0,0,fp)), std::size_t>::value), "");
-    static_assert((std::is_same<decltype(std::fwrite((const void*)0,0,0,fp)), std::size_t>::value), "");
+    static_assert((std::is_same<decltype(std::fwrite(vp,0,0,fp)), std::size_t>::value), "");
 #ifndef _LIBCPP_HAS_NO_FGETPOS_FSETPOS
     static_assert((std::is_same<decltype(std::fgetpos(fp, &fpos)), int>::value), "");
 #endif
@@ -149,7 +151,7 @@ int main(int, char**)
     static_assert((std::is_same<decltype(std::gets(cp)), char*>::value), "");
 #endif
     static_assert((std::is_same<decltype(std::scanf(" ")), int>::value), "");
-    static_assert((std::is_same<decltype(std::vscanf("",va)), int>::value), "");
+    static_assert((std::is_same<decltype(std::vscanf(" ",va)), int>::value), "");
 #endif
 
 #ifndef _LIBCPP_HAS_NO_STDOUT

diff  --git a/libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.last_write_time/last_write_time.pass.cpp b/libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.last_write_time/last_write_time.pass.cpp
index d3841f5406c8..f4a9210a1376 100644
--- a/libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.last_write_time/last_write_time.pass.cpp
+++ b/libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.last_write_time/last_write_time.pass.cpp
@@ -17,10 +17,11 @@
 //                      std::error_code& ec) noexcept;
 
 #include "filesystem_include.h"
-#include <type_traits>
 #include <chrono>
 #include <cstdio>
 #include <cstdlib>
+#include <ctime>
+#include <type_traits>
 
 #include "test_macros.h"
 #include "rapid-cxx-test.h"
@@ -32,8 +33,8 @@
 
 using namespace fs;
 
-using TimeSpec = struct ::timespec;
-using StatT = struct ::stat;
+using TimeSpec = std::timespec;
+using StatT = struct stat;
 
 using Sec = std::chrono::duration<file_time_type::rep>;
 using Hours = std::chrono::hours;

diff  --git a/libcxx/test/std/input.output/iostream.format/input.streams/istream.unformatted/sync.pass.cpp b/libcxx/test/std/input.output/iostream.format/input.streams/istream.unformatted/sync.pass.cpp
index ff22e9876f55..bc808fb69cae 100644
--- a/libcxx/test/std/input.output/iostream.format/input.streams/istream.unformatted/sync.pass.cpp
+++ b/libcxx/test/std/input.output/iostream.format/input.streams/istream.unformatted/sync.pass.cpp
@@ -111,6 +111,7 @@ int main(int, char**)
         assert( is.bad());
         assert(!is.eof());
         assert( is.fail());
+        assert(threw);
     }
     {
         throwing_testbuf<wchar_t> sb(L" 123456789");
@@ -125,6 +126,7 @@ int main(int, char**)
         assert( is.bad());
         assert(!is.eof());
         assert( is.fail());
+        assert(threw);
     }
 #endif
 

diff  --git a/libcxx/test/std/iterators/iterator.container/ssize.pass.cpp b/libcxx/test/std/iterators/iterator.container/ssize.pass.cpp
index a26663b1dcdf..f077e977a35f 100644
--- a/libcxx/test/std/iterators/iterator.container/ssize.pass.cpp
+++ b/libcxx/test/std/iterators/iterator.container/ssize.pass.cpp
@@ -23,12 +23,14 @@
 
 #include "test_macros.h"
 
+// Ignore warning about std::numeric_limits comparisons being tautological.
+#ifdef __GNUC__
+#pragma GCC diagnostic ignored "-Wtype-limits"
+#endif
 
 struct short_container {
     uint16_t size() const { return 60000; } // not noexcept
-    };
-
-
+};
 
 template<typename C>
 void test_container(C& c)

diff  --git a/libcxx/test/std/language.support/support.dynamic/destroying_delete_t_declaration.pass.cpp b/libcxx/test/std/language.support/support.dynamic/destroying_delete_t_declaration.pass.cpp
index 6dcfbe8cd97a..b98af1bfe1e4 100644
--- a/libcxx/test/std/language.support/support.dynamic/destroying_delete_t_declaration.pass.cpp
+++ b/libcxx/test/std/language.support/support.dynamic/destroying_delete_t_declaration.pass.cpp
@@ -46,7 +46,6 @@ int main(int, char**) {
   static_assert(std::is_default_constructible<std::destroying_delete_t>::value, "");
   static_assert(!test_convertible<std::destroying_delete_t>(), "");
   constexpr std::destroying_delete_t dd{};
-  static_assert((dd, true), "");
   static_assert(&dd != &std::destroying_delete, "");
   static_assert(test_constexpr(std::destroying_delete), "");
   return 0;

diff  --git a/libcxx/test/std/language.support/support.initlist/support.initlist.access/access.pass.cpp b/libcxx/test/std/language.support/support.initlist/support.initlist.access/access.pass.cpp
index 4a793bc59f25..695001008ed1 100644
--- a/libcxx/test/std/language.support/support.initlist/support.initlist.access/access.pass.cpp
+++ b/libcxx/test/std/language.support/support.initlist/support.initlist.access/access.pass.cpp
@@ -53,7 +53,7 @@ struct B
 
 int main(int, char**)
 {
-    A test1 = {3, 2, 1};
+    A test1 = {3, 2, 1}; (void)test1;
 #if TEST_STD_VER > 11
     constexpr B test2 = {3, 2, 1};
     (void)test2;

diff  --git a/libcxx/test/std/language.support/support.initlist/support.initlist.range/begin_end.pass.cpp b/libcxx/test/std/language.support/support.initlist/support.initlist.range/begin_end.pass.cpp
index 1015467f320d..335a8ef5a427 100644
--- a/libcxx/test/std/language.support/support.initlist/support.initlist.range/begin_end.pass.cpp
+++ b/libcxx/test/std/language.support/support.initlist/support.initlist.range/begin_end.pass.cpp
@@ -51,7 +51,7 @@ struct B
 
 int main(int, char**)
 {
-    A test1 = {3, 2, 1};
+    A test1 = {3, 2, 1}; (void)test1;
 #if TEST_STD_VER > 11
     constexpr B test2 = {3, 2, 1};
     (void)test2;

diff  --git a/libcxx/test/std/language.support/support.runtime/cstdlib.pass.cpp b/libcxx/test/std/language.support/support.runtime/cstdlib.pass.cpp
index 72a3cf8d33a9..668213f84838 100644
--- a/libcxx/test/std/language.support/support.runtime/cstdlib.pass.cpp
+++ b/libcxx/test/std/language.support/support.runtime/cstdlib.pass.cpp
@@ -124,18 +124,21 @@ int main(int, char**)
         (std::is_same<decltype(std::aligned_alloc(1, 0)), void*>::value), "");
 #endif
 
+    void* pv = 0;
+    void (*handler)() = 0;
+    int (*comp)(void const*, void const*) = 0;
     static_assert((std::is_same<decltype(std::calloc(0,0)), void*>::value), "");
     static_assert((std::is_same<decltype(std::free(0)), void>::value), "");
     static_assert((std::is_same<decltype(std::malloc(0)), void*>::value), "");
     static_assert((std::is_same<decltype(std::realloc(0,0)), void*>::value), "");
     static_assert((std::is_same<decltype(std::abort()), void>::value), "");
-    static_assert((std::is_same<decltype(std::atexit(0)), int>::value), "");
+    static_assert((std::is_same<decltype(std::atexit(handler)), int>::value), "");
     static_assert((std::is_same<decltype(std::exit(0)), void>::value), "");
     static_assert((std::is_same<decltype(std::_Exit(0)), void>::value), "");
     static_assert((std::is_same<decltype(std::getenv("")), char*>::value), "");
     static_assert((std::is_same<decltype(std::system("")), int>::value), "");
-    static_assert((std::is_same<decltype(std::bsearch(0,0,0,0,0)), void*>::value), "");
-    static_assert((std::is_same<decltype(std::qsort(0,0,0,0)), void>::value), "");
+    static_assert((std::is_same<decltype(std::bsearch(pv,pv,0,0,comp)), void*>::value), "");
+    static_assert((std::is_same<decltype(std::qsort(pv,0,0,comp)), void>::value), "");
     static_assert((std::is_same<decltype(std::abs(0)), int>::value), "");
     static_assert((std::is_same<decltype(std::abs((long)0)), long>::value), "");
     static_assert((std::is_same<decltype(std::abs((long long)0)), long long>::value), "");

diff  --git a/libcxx/test/std/language.support/support.runtime/ctime.pass.cpp b/libcxx/test/std/language.support/support.runtime/ctime.pass.cpp
index fb744c5001e9..df827793a128 100644
--- a/libcxx/test/std/language.support/support.runtime/ctime.pass.cpp
+++ b/libcxx/test/std/language.support/support.runtime/ctime.pass.cpp
@@ -45,7 +45,7 @@ int main(int, char**)
     static_assert((std::is_same<decltype(std::mktime(&tm)), std::time_t>::value), "");
     static_assert((std::is_same<decltype(std::time(&t)), std::time_t>::value), "");
 #if TEST_STD_VER > 14 && defined(TEST_HAS_TIMESPEC_GET)
-    static_assert((std::is_same<decltype(std::timespec_get(nullptr, 0)), int>::value), "");
+    static_assert((std::is_same<decltype(std::timespec_get(&tmspec, 0)), int>::value), "");
 #endif
 #ifndef _LIBCPP_HAS_NO_THREAD_UNSAFE_C_FUNCTIONS
     static_assert((std::is_same<decltype(std::asctime(&tm)), char*>::value), "");

diff  --git a/libcxx/test/std/localization/locale.categories/category.monetary/locale.moneypunct/money_base.pass.cpp b/libcxx/test/std/localization/locale.categories/category.monetary/locale.moneypunct/money_base.pass.cpp
index 5ebf0e8caf91..fb39976b5649 100644
--- a/libcxx/test/std/localization/locale.categories/category.monetary/locale.moneypunct/money_base.pass.cpp
+++ b/libcxx/test/std/localization/locale.categories/category.monetary/locale.moneypunct/money_base.pass.cpp
@@ -29,7 +29,7 @@ int main(int, char**)
     static_assert(std::money_base::sign == 3, "");
     static_assert(std::money_base::value == 4, "");
     static_assert(sizeof(std::money_base::pattern) == 4, "");
-    std::money_base::pattern p;
+    std::money_base::pattern p; (void)p;
     p.field[0] = std::money_base::none;
 
   return 0;

diff  --git a/libcxx/test/std/numerics/numarray/template.valarray/valarray.unary/not.pass.cpp b/libcxx/test/std/numerics/numarray/template.valarray/valarray.unary/not.pass.cpp
index 1abc5112cb60..714402602c48 100644
--- a/libcxx/test/std/numerics/numarray/template.valarray/valarray.unary/not.pass.cpp
+++ b/libcxx/test/std/numerics/numarray/template.valarray/valarray.unary/not.pass.cpp
@@ -38,7 +38,7 @@ int main(int, char**)
         std::valarray<bool> v2 = !(v + v);
         assert(v2.size() == v.size());
         for (std::size_t i = 0; i < v2.size(); ++i)
-            assert(v2[i] == !(2 * v[i]));
+            assert(v2[i] == !(v[i] + v[i]));
     }
 
   return 0;

diff  --git a/libcxx/test/std/utilities/memory/allocator.traits/allocator.traits.members/construct.pass.cpp b/libcxx/test/std/utilities/memory/allocator.traits/allocator.traits.members/construct.pass.cpp
index 10e8879012fc..38e24fdc5db4 100644
--- a/libcxx/test/std/utilities/memory/allocator.traits/allocator.traits.members/construct.pass.cpp
+++ b/libcxx/test/std/utilities/memory/allocator.traits/allocator.traits.members/construct.pass.cpp
@@ -36,13 +36,13 @@ struct B
 {
     typedef T value_type;
 
-    TEST_CONSTEXPR_CXX20 B(int& count) : count(count) {}
+    TEST_CONSTEXPR_CXX20 B(int& count) : count_(count) {}
 
 #if TEST_STD_VER >= 11
     template <class U, class ...Args>
     TEST_CONSTEXPR_CXX20 void construct(U* p, Args&& ...args)
     {
-        ++count;
+        ++count_;
 #if TEST_STD_VER > 17
         std::construct_at(p, std::forward<Args>(args)...);
 #else
@@ -51,7 +51,7 @@ struct B
     }
 #endif
 
-    int& count;
+    int& count_;
 };
 
 struct A0

diff  --git a/libcxx/test/std/utilities/memory/allocator.traits/allocator.traits.members/deallocate.pass.cpp b/libcxx/test/std/utilities/memory/allocator.traits/allocator.traits.members/deallocate.pass.cpp
index fd066b97b0f5..2f153eedc6fc 100644
--- a/libcxx/test/std/utilities/memory/allocator.traits/allocator.traits.members/deallocate.pass.cpp
+++ b/libcxx/test/std/utilities/memory/allocator.traits/allocator.traits.members/deallocate.pass.cpp
@@ -27,16 +27,16 @@ struct A
 {
     typedef T value_type;
 
-    TEST_CONSTEXPR_CXX20 A(int& called) : called(called) {}
+    TEST_CONSTEXPR_CXX20 A(int& called) : called_(called) {}
 
     TEST_CONSTEXPR_CXX20 void deallocate(value_type* p, std::size_t n)
     {
         assert(p == &storage);
         assert(n == 10);
-        ++called;
+        ++called_;
     }
 
-    int& called;
+    int& called_;
 
     value_type storage;
 };

diff  --git a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.assign/auto_ptr_Y.pass.cpp b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.assign/auto_ptr_Y.pass.cpp
index 20902be0ca97..9621434dc369 100644
--- a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.assign/auto_ptr_Y.pass.cpp
+++ b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.assign/auto_ptr_Y.pass.cpp
@@ -38,7 +38,7 @@ struct A
     static int count;
 
     A() {++count;}
-    A(const A&) {++count;}
+    A(const A& other) : B(other) {++count;}
     ~A() {--count;}
 };
 

diff  --git a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.assign/shared_ptr.pass.cpp b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.assign/shared_ptr.pass.cpp
index 75f58e4411fa..47b5190aecd1 100644
--- a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.assign/shared_ptr.pass.cpp
+++ b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.assign/shared_ptr.pass.cpp
@@ -37,7 +37,7 @@ struct A
     static int count;
 
     A() {++count;}
-    A(const A&) {++count;}
+    A(const A& other) : B(other) {++count;}
     ~A() {--count;}
 };
 

diff  --git a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.assign/shared_ptr_Y.pass.cpp b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.assign/shared_ptr_Y.pass.cpp
index 6fd4c8e07423..7e23e62bff19 100644
--- a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.assign/shared_ptr_Y.pass.cpp
+++ b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.assign/shared_ptr_Y.pass.cpp
@@ -35,7 +35,7 @@ struct A
     static int count;
 
     A() {++count;}
-    A(const A&) {++count;}
+    A(const A& other) : B(other) {++count;}
     ~A() {--count;}
 };
 

diff  --git a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.assign/shared_ptr_Y_rv.pass.cpp b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.assign/shared_ptr_Y_rv.pass.cpp
index 4a9b97ebfb2d..b86cfd4cf0b4 100644
--- a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.assign/shared_ptr_Y_rv.pass.cpp
+++ b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.assign/shared_ptr_Y_rv.pass.cpp
@@ -37,7 +37,7 @@ struct A
     static int count;
 
     A() {++count;}
-    A(const A&) {++count;}
+    A(const A& other) : B(other) {++count;}
     ~A() {--count;}
 };
 

diff  --git a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.assign/shared_ptr_rv.pass.cpp b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.assign/shared_ptr_rv.pass.cpp
index 7e8bccb3b905..9dc51068140e 100644
--- a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.assign/shared_ptr_rv.pass.cpp
+++ b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.assign/shared_ptr_rv.pass.cpp
@@ -37,7 +37,7 @@ struct A
     static int count;
 
     A() {++count;}
-    A(const A&) {++count;}
+    A(const A& other) : B(other) {++count;}
     ~A() {--count;}
 };
 

diff  --git a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.assign/unique_ptr_Y.pass.cpp b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.assign/unique_ptr_Y.pass.cpp
index 349fbec746f1..0096897ee07e 100644
--- a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.assign/unique_ptr_Y.pass.cpp
+++ b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.assign/unique_ptr_Y.pass.cpp
@@ -35,7 +35,7 @@ struct A
     static int count;
 
     A() {++count;}
-    A(const A&) {++count;}
+    A(const A& other) : B(other) {++count;}
     ~A() {--count;}
 };
 

diff  --git a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.cast/const_pointer_cast.pass.cpp b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.cast/const_pointer_cast.pass.cpp
index 588a79f9b07f..d0da8c1124c9 100644
--- a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.cast/const_pointer_cast.pass.cpp
+++ b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.cast/const_pointer_cast.pass.cpp
@@ -35,7 +35,7 @@ struct A
     static int count;
 
     A() {++count;}
-    A(const A&) {++count;}
+    A(const A& other) : B(other) {++count;}
     ~A() {--count;}
 };
 

diff  --git a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.cast/dynamic_pointer_cast.pass.cpp b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.cast/dynamic_pointer_cast.pass.cpp
index 6059ff8b562f..7a8041ee13c8 100644
--- a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.cast/dynamic_pointer_cast.pass.cpp
+++ b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.cast/dynamic_pointer_cast.pass.cpp
@@ -37,7 +37,7 @@ struct A
     static int count;
 
     A() {++count;}
-    A(const A&) {++count;}
+    A(const A& other) : B(other) {++count;}
     ~A() {--count;}
 };
 

diff  --git a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.cast/static_pointer_cast.pass.cpp b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.cast/static_pointer_cast.pass.cpp
index 8f8dadea0d48..6449f72251d9 100644
--- a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.cast/static_pointer_cast.pass.cpp
+++ b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.cast/static_pointer_cast.pass.cpp
@@ -35,7 +35,7 @@ struct A
     static int count;
 
     A() {++count;}
-    A(const A&) {++count;}
+    A(const A& other) : B(other) {++count;}
     ~A() {--count;}
 };
 

diff  --git a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.const/auto_ptr.pass.cpp b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.const/auto_ptr.pass.cpp
index 00b1a596facb..f1ffba637b34 100644
--- a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.const/auto_ptr.pass.cpp
+++ b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.const/auto_ptr.pass.cpp
@@ -38,7 +38,7 @@ struct A
     static int count;
 
     A() {++count;}
-    A(const A&) {++count;}
+    A(const A& other) : B(other) {++count;}
     ~A() {--count;}
 };
 

diff  --git a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.const/shared_ptr_Y.pass.cpp b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.const/shared_ptr_Y.pass.cpp
index 6f770ef0dd2c..62eb5eba1809 100644
--- a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.const/shared_ptr_Y.pass.cpp
+++ b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.const/shared_ptr_Y.pass.cpp
@@ -35,7 +35,7 @@ struct A
     static int count;
 
     A() {++count;}
-    A(const A&) {++count;}
+    A(const A& other) : B(other) {++count;}
     ~A() {--count;}
 };
 

diff  --git a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.const/shared_ptr_Y_rv.pass.cpp b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.const/shared_ptr_Y_rv.pass.cpp
index 67d158d9f706..9e47293b3716 100644
--- a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.const/shared_ptr_Y_rv.pass.cpp
+++ b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.const/shared_ptr_Y_rv.pass.cpp
@@ -37,7 +37,7 @@ struct A
     static int count;
 
     A() {++count;}
-    A(const A&) {++count;}
+    A(const A& other) : B(other) {++count;}
     ~A() {--count;}
 };
 

diff  --git a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.const/unique_ptr.pass.cpp b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.const/unique_ptr.pass.cpp
index 3cbaf5e1edf6..398c64ee6d74 100644
--- a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.const/unique_ptr.pass.cpp
+++ b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.const/unique_ptr.pass.cpp
@@ -37,7 +37,7 @@ struct A
     static int count;
 
     A() {++count;}
-    A(const A&) {++count;}
+    A(const A& other) : B(other) {++count;}
     ~A() {--count;}
 };
 

diff  --git a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.const/weak_ptr.pass.cpp b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.const/weak_ptr.pass.cpp
index 9174f39be37b..4859f8104933 100644
--- a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.const/weak_ptr.pass.cpp
+++ b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.const/weak_ptr.pass.cpp
@@ -34,7 +34,7 @@ struct A
     static int count;
 
     A() {++count;}
-    A(const A&) {++count;}
+    A(const A& other) : B(other) {++count;}
     ~A() {--count;}
 };
 

diff  --git a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.mod/reset.pass.cpp b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.mod/reset.pass.cpp
index 55c22414d63a..0d175d40d7ff 100644
--- a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.mod/reset.pass.cpp
+++ b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.mod/reset.pass.cpp
@@ -34,7 +34,7 @@ struct A
     static int count;
 
     A() {++count;}
-    A(const A&) {++count;}
+    A(const A& other) : B(other) {++count;}
     ~A() {--count;}
 };
 

diff  --git a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.mod/reset_pointer.pass.cpp b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.mod/reset_pointer.pass.cpp
index 789013fdaac9..d2e6c9f0de2e 100644
--- a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.mod/reset_pointer.pass.cpp
+++ b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.mod/reset_pointer.pass.cpp
@@ -34,7 +34,7 @@ struct A
     static int count;
 
     A() {++count;}
-    A(const A&) {++count;}
+    A(const A& other) : B(other) {++count;}
     ~A() {--count;}
 };
 

diff  --git a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.mod/reset_pointer_deleter.pass.cpp b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.mod/reset_pointer_deleter.pass.cpp
index c337e1925773..f4944db727d0 100644
--- a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.mod/reset_pointer_deleter.pass.cpp
+++ b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.mod/reset_pointer_deleter.pass.cpp
@@ -34,7 +34,7 @@ struct A
     static int count;
 
     A() {++count;}
-    A(const A&) {++count;}
+    A(const A& other) : B(other) {++count;}
     ~A() {--count;}
 };
 

diff  --git a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.mod/reset_pointer_deleter_allocator.pass.cpp b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.mod/reset_pointer_deleter_allocator.pass.cpp
index 2724e35fbef9..481284016835 100644
--- a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.mod/reset_pointer_deleter_allocator.pass.cpp
+++ b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.mod/reset_pointer_deleter_allocator.pass.cpp
@@ -35,7 +35,7 @@ struct A
     static int count;
 
     A() {++count;}
-    A(const A&) {++count;}
+    A(const A& other) : B(other) {++count;}
     ~A() {--count;}
 };
 

diff  --git a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.weak/util.smartptr.weak.assign/shared_ptr_Y.pass.cpp b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.weak/util.smartptr.weak.assign/shared_ptr_Y.pass.cpp
index f899dc426251..86624478f40f 100644
--- a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.weak/util.smartptr.weak.assign/shared_ptr_Y.pass.cpp
+++ b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.weak/util.smartptr.weak.assign/shared_ptr_Y.pass.cpp
@@ -35,7 +35,7 @@ struct A
     static int count;
 
     A() {++count;}
-    A(const A&) {++count;}
+    A(const A& other) : B(other) {++count;}
     ~A() {--count;}
 };
 

diff  --git a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.weak/util.smartptr.weak.assign/weak_ptr.pass.cpp b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.weak/util.smartptr.weak.assign/weak_ptr.pass.cpp
index ae166a566265..c722dd0de262 100644
--- a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.weak/util.smartptr.weak.assign/weak_ptr.pass.cpp
+++ b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.weak/util.smartptr.weak.assign/weak_ptr.pass.cpp
@@ -35,7 +35,7 @@ struct A
     static int count;
 
     A() {++count;}
-    A(const A&) {++count;}
+    A(const A& other) : B(other) {++count;}
     ~A() {--count;}
 };
 

diff  --git a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.weak/util.smartptr.weak.assign/weak_ptr_Y.pass.cpp b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.weak/util.smartptr.weak.assign/weak_ptr_Y.pass.cpp
index 257e5ef189eb..9da2fd75fbf2 100644
--- a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.weak/util.smartptr.weak.assign/weak_ptr_Y.pass.cpp
+++ b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.weak/util.smartptr.weak.assign/weak_ptr_Y.pass.cpp
@@ -35,7 +35,7 @@ struct A
     static int count;
 
     A() {++count;}
-    A(const A&) {++count;}
+    A(const A& other) : B(other) {++count;}
     ~A() {--count;}
 };
 

diff  --git a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.weak/util.smartptr.weak.const/shared_ptr_Y.pass.cpp b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.weak/util.smartptr.weak.const/shared_ptr_Y.pass.cpp
index 24f57d3449fb..3b66e9ae27fa 100644
--- a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.weak/util.smartptr.weak.const/shared_ptr_Y.pass.cpp
+++ b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.weak/util.smartptr.weak.const/shared_ptr_Y.pass.cpp
@@ -35,7 +35,7 @@ struct A
     static int count;
 
     A() {++count;}
-    A(const A&) {++count;}
+    A(const A& other) : B(other) {++count;}
     ~A() {--count;}
 };
 

diff  --git a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.weak/util.smartptr.weak.const/weak_ptr.pass.cpp b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.weak/util.smartptr.weak.const/weak_ptr.pass.cpp
index 658b233c41c7..179c2f5928a4 100644
--- a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.weak/util.smartptr.weak.const/weak_ptr.pass.cpp
+++ b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.weak/util.smartptr.weak.const/weak_ptr.pass.cpp
@@ -36,7 +36,7 @@ struct A
     static int count;
 
     A() {++count;}
-    A(const A&) {++count;}
+    A(const A& other) : B(other) {++count;}
     ~A() {--count;}
 };
 

diff  --git a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.weak/util.smartptr.weak.const/weak_ptr_Y.pass.cpp b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.weak/util.smartptr.weak.const/weak_ptr_Y.pass.cpp
index 478af1e1b5a9..3fd447356cd7 100644
--- a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.weak/util.smartptr.weak.const/weak_ptr_Y.pass.cpp
+++ b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.weak/util.smartptr.weak.const/weak_ptr_Y.pass.cpp
@@ -36,7 +36,7 @@ struct A
     static int count;
 
     A() {++count;}
-    A(const A&) {++count;}
+    A(const A& other) : B(other) {++count;}
     ~A() {--count;}
 };
 

diff  --git a/libcxx/test/std/utilities/meta/meta.trans/meta.trans.other/result_of11.pass.cpp b/libcxx/test/std/utilities/meta/meta.trans/meta.trans.other/result_of11.pass.cpp
index 2cc90f28d855..35abfa9cbeae 100644
--- a/libcxx/test/std/utilities/meta/meta.trans/meta.trans.other/result_of11.pass.cpp
+++ b/libcxx/test/std/utilities/meta/meta.trans/meta.trans.other/result_of11.pass.cpp
@@ -17,6 +17,12 @@
 #include <utility>
 #include "test_macros.h"
 
+// Ignore warnings about volatile in parameters being deprecated.
+// We know it is, but we still have to test it.
+#ifdef __GNUC__
+#pragma GCC diagnostic ignored "-Wvolatile"
+#endif
+
 struct wat
 {
     wat& operator*() { return *this; }

diff  --git a/libcxx/test/std/utilities/optional/optional.object/optional.object.ctor/rvalue_T.pass.cpp b/libcxx/test/std/utilities/optional/optional.object/optional.object.ctor/rvalue_T.pass.cpp
index fc19d52e0de2..521706d74eef 100644
--- a/libcxx/test/std/utilities/optional/optional.object/optional.object.ctor/rvalue_T.pass.cpp
+++ b/libcxx/test/std/utilities/optional/optional.object/optional.object.ctor/rvalue_T.pass.cpp
@@ -138,15 +138,10 @@ int main(int, char**)
     }
 #ifndef TEST_HAS_NO_EXCEPTIONS
     {
-        struct Z {
-            Z(int) {}
-            Z(Z&&) {throw 6;}
-        };
-        typedef Z T;
         try
         {
-            T t(3);
-            optional<T> opt(std::move(t));
+            Z z(3);
+            optional<Z> opt(std::move(z));
             assert(false);
         }
         catch (int i)

diff  --git a/libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.dltr/unique.ptr.dltr.dflt/convert_ctor.pass.cpp b/libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.dltr/unique.ptr.dltr.dflt/convert_ctor.pass.cpp
index 83a5f3132e78..d4c00f46748f 100644
--- a/libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.dltr/unique.ptr.dltr.dflt/convert_ctor.pass.cpp
+++ b/libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.dltr/unique.ptr.dltr.dflt/convert_ctor.pass.cpp
@@ -30,7 +30,7 @@ struct B
 {
     static int count;
     B() {++count;}
-    B(const B&) {++count;}
+    B(const B& other) : A(other) {++count;}
     virtual ~B() {--count;}
 };
 

diff  --git a/libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.special/eq.pass.cpp b/libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.special/eq.pass.cpp
index 0d0ac2709b7c..6bd1451212dc 100644
--- a/libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.special/eq.pass.cpp
+++ b/libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.special/eq.pass.cpp
@@ -39,7 +39,7 @@ struct B
 {
     static int count;
     B() {++count;}
-    B(const B&) {++count;}
+    B(const B& other) : A(other) {++count;}
     virtual ~B() {--count;}
 };
 

diff  --git a/libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.special/rel.pass.cpp b/libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.special/rel.pass.cpp
index bc411ca545c2..b8f1c4b91c12 100644
--- a/libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.special/rel.pass.cpp
+++ b/libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.special/rel.pass.cpp
@@ -47,7 +47,7 @@ struct B
 {
     static int count;
     B() {++count;}
-    B(const B&) {++count;}
+    B(const B& other) : A(other) {++count;}
     virtual ~B() {--count;}
 };
 

diff  --git a/libcxx/test/std/utilities/template.bitset/bitset.cons/char_ptr_ctor.pass.cpp b/libcxx/test/std/utilities/template.bitset/bitset.cons/char_ptr_ctor.pass.cpp
index ee6405bde1e7..58549b94e0d3 100644
--- a/libcxx/test/std/utilities/template.bitset/bitset.cons/char_ptr_ctor.pass.cpp
+++ b/libcxx/test/std/utilities/template.bitset/bitset.cons/char_ptr_ctor.pass.cpp
@@ -36,12 +36,12 @@ void test_char_pointer_ctor()
     }
 
     {
-    const char str[] ="1010101010";
+    const char str[] = "1010101010";
     std::bitset<N> v(str);
-    std::size_t M = std::min<std::size_t>(N, 10);
+    std::size_t M = std::min<std::size_t>(v.size(), 10);
     for (std::size_t i = 0; i < M; ++i)
         assert(v[i] == (str[M - 1 - i] == '1'));
-    for (std::size_t i = 10; i < N; ++i)
+    for (std::size_t i = 10; i < v.size(); ++i)
         assert(v[i] == false);
     }
 }

diff  --git a/libcxx/test/std/utilities/template.bitset/bitset.cons/default.pass.cpp b/libcxx/test/std/utilities/template.bitset/bitset.cons/default.pass.cpp
index bb5de6b18c72..a59427bdd061 100644
--- a/libcxx/test/std/utilities/template.bitset/bitset.cons/default.pass.cpp
+++ b/libcxx/test/std/utilities/template.bitset/bitset.cons/default.pass.cpp
@@ -13,17 +13,13 @@
 
 #include "test_macros.h"
 
-#if defined(TEST_COMPILER_C1XX)
-#pragma warning(disable: 6294) // Ill-defined for-loop:  initial condition does not satisfy test.  Loop body not executed.
-#endif
-
 template <std::size_t N>
 void test_default_ctor()
 {
     {
         TEST_CONSTEXPR std::bitset<N> v1;
         assert(v1.size() == N);
-        for (std::size_t i = 0; i < N; ++i)
+        for (std::size_t i = 0; i < v1.size(); ++i)
             assert(v1[i] == false);
     }
 #if TEST_STD_VER >= 11

diff  --git a/libcxx/test/std/utilities/template.bitset/bitset.cons/ull_ctor.pass.cpp b/libcxx/test/std/utilities/template.bitset/bitset.cons/ull_ctor.pass.cpp
index 4697d8bd380a..2f5c066221da 100644
--- a/libcxx/test/std/utilities/template.bitset/bitset.cons/ull_ctor.pass.cpp
+++ b/libcxx/test/std/utilities/template.bitset/bitset.cons/ull_ctor.pass.cpp
@@ -25,10 +25,10 @@ void test_val_ctor()
     {
         TEST_CONSTEXPR std::bitset<N> v(0xAAAAAAAAAAAAAAAAULL);
         assert(v.size() == N);
-        std::size_t M = std::min<std::size_t>(N, 64);
+        std::size_t M = std::min<std::size_t>(v.size(), 64);
         for (std::size_t i = 0; i < M; ++i)
             assert(v[i] == ((i & 1) != 0));
-        for (std::size_t i = M; i < N; ++i)
+        for (std::size_t i = M; i < v.size(); ++i)
             assert(v[i] == false);
     }
 #if TEST_STD_VER >= 11

diff  --git a/libcxx/test/std/utilities/template.bitset/bitset.members/right_shift_eq.pass.cpp b/libcxx/test/std/utilities/template.bitset/bitset.members/right_shift_eq.pass.cpp
index a103f3758585..a32f602d0c03 100644
--- a/libcxx/test/std/utilities/template.bitset/bitset.members/right_shift_eq.pass.cpp
+++ b/libcxx/test/std/utilities/template.bitset/bitset.members/right_shift_eq.pass.cpp
@@ -25,7 +25,7 @@ void test_right_shift() {
             std::bitset<N> v2 = v1;
             v1 >>= s;
             for (std::size_t i = 0; i < v1.size(); ++i)
-                if (i + s < N)
+                if (i + s < v1.size())
                     assert(v1[i] == v2[i + s]);
                 else
                     assert(v1[i] == 0);

diff  --git a/libcxx/test/std/utilities/time/date.time/ctime.pass.cpp b/libcxx/test/std/utilities/time/date.time/ctime.pass.cpp
index da16c85e7cd5..8ad3cca4758e 100644
--- a/libcxx/test/std/utilities/time/date.time/ctime.pass.cpp
+++ b/libcxx/test/std/utilities/time/date.time/ctime.pass.cpp
@@ -51,7 +51,7 @@ int main(int, char**)
     static_assert((std::is_same<decltype(std::mktime(&tm)), std::time_t>::value), "");
     static_assert((std::is_same<decltype(std::time(&t)), std::time_t>::value), "");
 #if TEST_STD_VER > 14 && defined(TEST_HAS_TIMESPEC_GET)
-    static_assert((std::is_same<decltype(std::timespec_get(nullptr, 0)), int>::value), "");
+    static_assert((std::is_same<decltype(std::timespec_get(&tmspec, 0)), int>::value), "");
 #endif
 #ifndef _LIBCPP_HAS_NO_THREAD_UNSAFE_C_FUNCTIONS
     static_assert((std::is_same<decltype(std::asctime(&tm)), char*>::value), "");

diff  --git a/libcxx/test/std/utilities/time/time.cal/time.cal.day/time.cal.day.members/ctor.pass.cpp b/libcxx/test/std/utilities/time/time.cal/time.cal.day/time.cal.day.members/ctor.pass.cpp
index bd03d512ba5c..63a68d574851 100644
--- a/libcxx/test/std/utilities/time/time.cal/time.cal.day/time.cal.day.members/ctor.pass.cpp
+++ b/libcxx/test/std/utilities/time/time.cal/time.cal.day/time.cal.day.members/ctor.pass.cpp
@@ -39,8 +39,8 @@ int main(int, char**)
 
     for (unsigned i = 0; i <= 255; ++i)
     {
-        day day(i);
-        assert(static_cast<unsigned>(day) == i);
+        day d(i);
+        assert(static_cast<unsigned>(d) == i);
     }
 
   return 0;

diff  --git a/libcxx/test/std/utilities/time/time.cal/time.cal.day/time.cal.day.members/decrement.pass.cpp b/libcxx/test/std/utilities/time/time.cal/time.cal.day/time.cal.day.members/decrement.pass.cpp
index 032f9289fb05..fd15b98b25f7 100644
--- a/libcxx/test/std/utilities/time/time.cal/time.cal.day/time.cal.day.members/decrement.pass.cpp
+++ b/libcxx/test/std/utilities/time/time.cal/time.cal.day/time.cal.day.members/decrement.pass.cpp
@@ -43,10 +43,10 @@ int main(int, char**)
 
     for (unsigned i = 10; i <= 20; ++i)
     {
-        day day(i);
-        assert(static_cast<unsigned>(--day) == i - 1);
-        assert(static_cast<unsigned>(day--) == i - 1);
-        assert(static_cast<unsigned>(day)   == i - 2);
+        day d(i);
+        assert(static_cast<unsigned>(--d) == i - 1);
+        assert(static_cast<unsigned>(d--) == i - 1);
+        assert(static_cast<unsigned>(d)   == i - 2);
     }
 
   return 0;

diff  --git a/libcxx/test/std/utilities/time/time.cal/time.cal.day/time.cal.day.members/increment.pass.cpp b/libcxx/test/std/utilities/time/time.cal/time.cal.day/time.cal.day.members/increment.pass.cpp
index f7ba56427811..f11021b35f4d 100644
--- a/libcxx/test/std/utilities/time/time.cal/time.cal.day/time.cal.day.members/increment.pass.cpp
+++ b/libcxx/test/std/utilities/time/time.cal/time.cal.day/time.cal.day.members/increment.pass.cpp
@@ -43,10 +43,10 @@ int main(int, char**)
 
     for (unsigned i = 10; i <= 20; ++i)
     {
-        day day(i);
-        assert(static_cast<unsigned>(++day) == i + 1);
-        assert(static_cast<unsigned>(day++) == i + 1);
-        assert(static_cast<unsigned>(day)   == i + 2);
+        day d(i);
+        assert(static_cast<unsigned>(++d) == i + 1);
+        assert(static_cast<unsigned>(d++) == i + 1);
+        assert(static_cast<unsigned>(d)   == i + 2);
     }
 
   return 0;

diff  --git a/libcxx/test/std/utilities/time/time.cal/time.cal.day/time.cal.day.members/plus_minus_equal.pass.cpp b/libcxx/test/std/utilities/time/time.cal/time.cal.day/time.cal.day.members/plus_minus_equal.pass.cpp
index a23477e7f80b..723ab2af14d1 100644
--- a/libcxx/test/std/utilities/time/time.cal/time.cal.day/time.cal.day.members/plus_minus_equal.pass.cpp
+++ b/libcxx/test/std/utilities/time/time.cal/time.cal.day/time.cal.day.members/plus_minus_equal.pass.cpp
@@ -47,11 +47,11 @@ int main(int, char**)
 
     for (unsigned i = 0; i <= 10; ++i)
     {
-        day day(i);
-        assert(static_cast<unsigned>(day += days{22}) == i + 22);
-        assert(static_cast<unsigned>(day)             == i + 22);
-        assert(static_cast<unsigned>(day -= days{12}) == i + 10);
-        assert(static_cast<unsigned>(day)             == i + 10);
+        day d(i);
+        assert(static_cast<unsigned>(d += days{22}) == i + 22);
+        assert(static_cast<unsigned>(d)             == i + 22);
+        assert(static_cast<unsigned>(d -= days{12}) == i + 10);
+        assert(static_cast<unsigned>(d)             == i + 10);
     }
 
   return 0;

diff  --git a/libcxx/test/std/utilities/time/time.cal/time.cal.day/time.cal.day.nonmembers/literals.pass.cpp b/libcxx/test/std/utilities/time/time.cal/time.cal.day/time.cal.day.nonmembers/literals.pass.cpp
index aba50a61ead6..61de53b7acd5 100644
--- a/libcxx/test/std/utilities/time/time.cal/time.cal.day/time.cal.day.nonmembers/literals.pass.cpp
+++ b/libcxx/test/std/utilities/time/time.cal/time.cal.day/time.cal.day.nonmembers/literals.pass.cpp
@@ -30,7 +30,7 @@ int main(int, char**)
     static_assert( 7d == day(7), "");
     day d1 = 4d;
     assert (d1 == day(4));
-}
+    }
 
     {
     using namespace std::literals;

diff  --git a/libcxx/test/std/utilities/time/time.cal/time.cal.month/time.cal.month.members/decrement.pass.cpp b/libcxx/test/std/utilities/time/time.cal/time.cal.month/time.cal.month.members/decrement.pass.cpp
index 49e877be2eaf..56711227771d 100644
--- a/libcxx/test/std/utilities/time/time.cal/time.cal.month/time.cal.month.members/decrement.pass.cpp
+++ b/libcxx/test/std/utilities/time/time.cal/time.cal.month/time.cal.month.members/decrement.pass.cpp
@@ -44,10 +44,10 @@ int main(int, char**)
 
     for (unsigned i = 10; i <= 20; ++i)
     {
-        month month(i);
-        assert(static_cast<unsigned>(--month) == i - 1);
-        assert(static_cast<unsigned>(month--) == i - 1);
-        assert(static_cast<unsigned>(month)   == i - 2);
+        month m(i);
+        assert(static_cast<unsigned>(--m) == i - 1);
+        assert(static_cast<unsigned>(m--) == i - 1);
+        assert(static_cast<unsigned>(m)   == i - 2);
     }
 
   return 0;

diff  --git a/libcxx/test/std/utilities/time/time.cal/time.cal.month/time.cal.month.members/increment.pass.cpp b/libcxx/test/std/utilities/time/time.cal/time.cal.month/time.cal.month.members/increment.pass.cpp
index 96701c11332b..af61d3442c3a 100644
--- a/libcxx/test/std/utilities/time/time.cal/time.cal.month/time.cal.month.members/increment.pass.cpp
+++ b/libcxx/test/std/utilities/time/time.cal/time.cal.month/time.cal.month.members/increment.pass.cpp
@@ -43,10 +43,10 @@ int main(int, char**)
 
     for (unsigned i = 0; i <= 10; ++i)
     {
-        month month(i);
-        assert(static_cast<unsigned>(++month) == i + 1);
-        assert(static_cast<unsigned>(month++) == i + 1);
-        assert(static_cast<unsigned>(month)   == i + 2);
+        month m(i);
+        assert(static_cast<unsigned>(++m) == i + 1);
+        assert(static_cast<unsigned>(m++) == i + 1);
+        assert(static_cast<unsigned>(m)   == i + 2);
     }
 
   return 0;

diff  --git a/libcxx/test/std/utilities/time/time.cal/time.cal.month/time.cal.month.members/plus_minus_equal.pass.cpp b/libcxx/test/std/utilities/time/time.cal/time.cal.month/time.cal.month.members/plus_minus_equal.pass.cpp
index f73e4179b154..848a96a9b73f 100644
--- a/libcxx/test/std/utilities/time/time.cal/time.cal.month/time.cal.month.members/plus_minus_equal.pass.cpp
+++ b/libcxx/test/std/utilities/time/time.cal/time.cal.month/time.cal.month.members/plus_minus_equal.pass.cpp
@@ -46,22 +46,22 @@ int main(int, char**)
 
     for (unsigned i = 1; i <= 10; ++i)
     {
-        month month(i);
+        month m(i);
         int exp = i + 10;
         while (exp > 12)
             exp -= 12;
-        assert(static_cast<unsigned>(month += months{10}) == static_cast<unsigned>(exp));
-        assert(static_cast<unsigned>(month)               == static_cast<unsigned>(exp));
+        assert(static_cast<unsigned>(m += months{10}) == static_cast<unsigned>(exp));
+        assert(static_cast<unsigned>(m)               == static_cast<unsigned>(exp));
     }
 
     for (unsigned i = 1; i <= 10; ++i)
     {
-        month month(i);
+        month m(i);
         int exp = i - 9;
         while (exp < 1)
             exp += 12;
-        assert(static_cast<unsigned>(month -= months{ 9}) == static_cast<unsigned>(exp));
-        assert(static_cast<unsigned>(month)               == static_cast<unsigned>(exp));
+        assert(static_cast<unsigned>(m -= months{ 9}) == static_cast<unsigned>(exp));
+        assert(static_cast<unsigned>(m)               == static_cast<unsigned>(exp));
     }
 
   return 0;

diff  --git a/libcxx/test/std/utilities/time/time.cal/time.cal.year/time.cal.year.members/ctor.pass.cpp b/libcxx/test/std/utilities/time/time.cal/time.cal.year/time.cal.year.members/ctor.pass.cpp
index 0c8605a69fc0..b32325aabcb2 100644
--- a/libcxx/test/std/utilities/time/time.cal/time.cal.year/time.cal.year.members/ctor.pass.cpp
+++ b/libcxx/test/std/utilities/time/time.cal/time.cal.year/time.cal.year.members/ctor.pass.cpp
@@ -39,8 +39,8 @@ int main(int, char**)
 
     for (int i = 0; i <= 2550; i += 7)
     {
-        year year(i);
-        assert(static_cast<int>(year) == i);
+        year yr(i);
+        assert(static_cast<int>(yr) == i);
     }
 
   return 0;

diff  --git a/libcxx/test/std/utilities/time/time.cal/time.cal.year/time.cal.year.members/decrement.pass.cpp b/libcxx/test/std/utilities/time/time.cal/time.cal.year/time.cal.year.members/decrement.pass.cpp
index 7add59448d10..1857a38eb335 100644
--- a/libcxx/test/std/utilities/time/time.cal/time.cal.year/time.cal.year.members/decrement.pass.cpp
+++ b/libcxx/test/std/utilities/time/time.cal/time.cal.year/time.cal.year.members/decrement.pass.cpp
@@ -43,10 +43,10 @@ int main(int, char**)
 
     for (int i = 11000; i <= 11020; ++i)
     {
-        year year(i);
-        assert(static_cast<int>(--year) == i - 1);
-        assert(static_cast<int>(year--) == i - 1);
-        assert(static_cast<int>(year)   == i - 2);
+        year yr(i);
+        assert(static_cast<int>(--yr) == i - 1);
+        assert(static_cast<int>(yr--) == i - 1);
+        assert(static_cast<int>(yr)   == i - 2);
     }
 
   return 0;

diff  --git a/libcxx/test/std/utilities/time/time.cal/time.cal.year/time.cal.year.members/increment.pass.cpp b/libcxx/test/std/utilities/time/time.cal/time.cal.year/time.cal.year.members/increment.pass.cpp
index 2db5eea6c54a..940768340423 100644
--- a/libcxx/test/std/utilities/time/time.cal/time.cal.year/time.cal.year.members/increment.pass.cpp
+++ b/libcxx/test/std/utilities/time/time.cal/time.cal.year/time.cal.year.members/increment.pass.cpp
@@ -43,10 +43,10 @@ int main(int, char**)
 
     for (int i = 11000; i <= 11020; ++i)
     {
-        year year(i);
-        assert(static_cast<int>(++year) == i + 1);
-        assert(static_cast<int>(year++) == i + 1);
-        assert(static_cast<int>(year)   == i + 2);
+        year yr(i);
+        assert(static_cast<int>(++yr) == i + 1);
+        assert(static_cast<int>(yr++) == i + 1);
+        assert(static_cast<int>(yr)   == i + 2);
     }
 
   return 0;

diff  --git a/libcxx/test/std/utilities/time/time.cal/time.cal.year/time.cal.year.members/plus_minus.pass.cpp b/libcxx/test/std/utilities/time/time.cal/time.cal.year/time.cal.year.members/plus_minus.pass.cpp
index 0307bab8a5b5..f351083ec1d2 100644
--- a/libcxx/test/std/utilities/time/time.cal/time.cal.year/time.cal.year.members/plus_minus.pass.cpp
+++ b/libcxx/test/std/utilities/time/time.cal/time.cal.year/time.cal.year.members/plus_minus.pass.cpp
@@ -42,9 +42,9 @@ int main(int, char**)
 
     for (int i = 10000; i <= 10020; ++i)
     {
-        year year(i);
-        assert(static_cast<int>(+year) ==  i);
-        assert(static_cast<int>(-year) == -i);
+        year yr(i);
+        assert(static_cast<int>(+yr) ==  i);
+        assert(static_cast<int>(-yr) == -i);
     }
 
   return 0;

diff  --git a/libcxx/test/std/utilities/time/time.cal/time.cal.year/time.cal.year.members/plus_minus_equal.pass.cpp b/libcxx/test/std/utilities/time/time.cal/time.cal.year/time.cal.year.members/plus_minus_equal.pass.cpp
index e71c5ea96bfc..f3236318281d 100644
--- a/libcxx/test/std/utilities/time/time.cal/time.cal.year/time.cal.year.members/plus_minus_equal.pass.cpp
+++ b/libcxx/test/std/utilities/time/time.cal/time.cal.year/time.cal.year.members/plus_minus_equal.pass.cpp
@@ -47,11 +47,11 @@ int main(int, char**)
 
     for (int i = 10000; i <= 10020; ++i)
     {
-        year year(i);
-        assert(static_cast<int>(year += years{10}) == i + 10);
-        assert(static_cast<int>(year)              == i + 10);
-        assert(static_cast<int>(year -= years{ 9}) == i +  1);
-        assert(static_cast<int>(year)              == i +  1);
+        year yr(i);
+        assert(static_cast<int>(yr += years{10}) == i + 10);
+        assert(static_cast<int>(yr)              == i + 10);
+        assert(static_cast<int>(yr -= years{ 9}) == i +  1);
+        assert(static_cast<int>(yr)              == i +  1);
     }
 
   return 0;

diff  --git a/libcxx/test/std/utilities/time/time.duration/time.duration.special/max.pass.cpp b/libcxx/test/std/utilities/time/time.duration/time.duration.special/max.pass.cpp
index 58de66a01583..dadd47bb7741 100644
--- a/libcxx/test/std/utilities/time/time.duration/time.duration.special/max.pass.cpp
+++ b/libcxx/test/std/utilities/time/time.duration/time.duration.special/max.pass.cpp
@@ -27,14 +27,14 @@ void test()
     ASSERT_NOEXCEPT(       std::chrono::duration_values<typename D::rep>::max());
 #endif
     {
-    typedef typename D::rep Rep;
-    Rep max_rep = std::chrono::duration_values<Rep>::max();
+    typedef typename D::rep DRep;
+    DRep max_rep = std::chrono::duration_values<DRep>::max();
     assert(D::max().count() == max_rep);
     }
 #if TEST_STD_VER >= 11
     {
-    typedef typename D::rep Rep;
-    constexpr Rep max_rep = std::chrono::duration_values<Rep>::max();
+    typedef typename D::rep DRep;
+    constexpr DRep max_rep = std::chrono::duration_values<DRep>::max();
     static_assert(D::max().count() == max_rep, "");
     }
 #endif

diff  --git a/libcxx/test/std/utilities/time/time.duration/time.duration.special/min.pass.cpp b/libcxx/test/std/utilities/time/time.duration/time.duration.special/min.pass.cpp
index 9b0113b2980d..1f4660a1d626 100644
--- a/libcxx/test/std/utilities/time/time.duration/time.duration.special/min.pass.cpp
+++ b/libcxx/test/std/utilities/time/time.duration/time.duration.special/min.pass.cpp
@@ -27,14 +27,14 @@ void test()
     ASSERT_NOEXCEPT(       std::chrono::duration_values<typename D::rep>::min());
 #endif
     {
-    typedef typename D::rep Rep;
-    Rep min_rep = std::chrono::duration_values<Rep>::min();
+    typedef typename D::rep DRep;
+    DRep min_rep = std::chrono::duration_values<DRep>::min();
     assert(D::min().count() == min_rep);
     }
 #if TEST_STD_VER >= 11
     {
-    typedef typename D::rep Rep;
-    constexpr Rep min_rep = std::chrono::duration_values<Rep>::min();
+    typedef typename D::rep DRep;
+    constexpr DRep min_rep = std::chrono::duration_values<DRep>::min();
     static_assert(D::min().count() == min_rep, "");
     }
 #endif

diff  --git a/libcxx/test/std/utilities/time/time.duration/time.duration.special/zero.pass.cpp b/libcxx/test/std/utilities/time/time.duration/time.duration.special/zero.pass.cpp
index 34a05b5f0715..a3f535071d7a 100644
--- a/libcxx/test/std/utilities/time/time.duration/time.duration.special/zero.pass.cpp
+++ b/libcxx/test/std/utilities/time/time.duration/time.duration.special/zero.pass.cpp
@@ -26,14 +26,14 @@ void test()
     ASSERT_NOEXCEPT(       std::chrono::duration_values<typename D::rep>::zero());
 #endif
     {
-    typedef typename D::rep Rep;
-    Rep zero_rep = std::chrono::duration_values<Rep>::zero();
+    typedef typename D::rep DRep;
+    DRep zero_rep = std::chrono::duration_values<DRep>::zero();
     assert(D::zero().count() == zero_rep);
     }
 #if TEST_STD_VER >= 11
     {
-    typedef typename D::rep Rep;
-    constexpr Rep zero_rep = std::chrono::duration_values<Rep>::zero();
+    typedef typename D::rep DRep;
+    constexpr DRep zero_rep = std::chrono::duration_values<DRep>::zero();
     static_assert(D::zero().count() == zero_rep, "");
     }
 #endif

diff  --git a/libcxx/test/std/utilities/utility/forward/move.pass.cpp b/libcxx/test/std/utilities/utility/forward/move.pass.cpp
index 64d4911a3395..e04aa138b572 100644
--- a/libcxx/test/std/utilities/utility/forward/move.pass.cpp
+++ b/libcxx/test/std/utilities/utility/forward/move.pass.cpp
@@ -76,19 +76,19 @@ int main(int, char**)
         assert(copy_ctor == 0);
         assert(move_ctor == 0);
 
-        A a2 = a;
+        A a2 = a; (void)a2;
         assert(copy_ctor == 1);
         assert(move_ctor == 0);
 
-        A a3 = std::move(a);
+        A a3 = std::move(a); (void)a3;
         assert(copy_ctor == 1);
         assert(move_ctor == 1);
 
-        A a4 = ca;
+        A a4 = ca; (void)a4;
         assert(copy_ctor == 2);
         assert(move_ctor == 1);
 
-        A a5 = std::move(ca);
+        A a5 = std::move(ca); (void)a5;
         assert(copy_ctor == 3);
         assert(move_ctor == 1);
     }

diff  --git a/libcxx/test/support/debug_mode_helper.h b/libcxx/test/support/debug_mode_helper.h
index c0cdac120333..fdda3d77e505 100644
--- a/libcxx/test/support/debug_mode_helper.h
+++ b/libcxx/test/support/debug_mode_helper.h
@@ -43,8 +43,8 @@ struct DebugInfoMatcher {
   static constexpr const char* any_msg = "*";
 
   constexpr DebugInfoMatcher() : is_empty(true), msg(any_msg, __builtin_strlen(any_msg)), file(any_file, __builtin_strlen(any_file)), line(any_line) { }
-  constexpr DebugInfoMatcher(const char* msg, const char* file = any_file, int line = any_line)
-    : is_empty(false), msg(msg, __builtin_strlen(msg)), file(file, __builtin_strlen(file)), line(line) {}
+  constexpr DebugInfoMatcher(const char* msg_, const char* file_ = any_file, int line_ = any_line)
+    : is_empty(false), msg(msg_, __builtin_strlen(msg_)), file(file_, __builtin_strlen(file_)), line(line_) {}
 
   bool Matches(std::__libcpp_debug_info const& got) const {
     assert(!empty() && "empty matcher");

diff  --git a/libcxx/test/support/filesystem_test_helper.h b/libcxx/test/support/filesystem_test_helper.h
index 2841b67fde95..1cf6bff87006 100644
--- a/libcxx/test/support/filesystem_test_helper.h
+++ b/libcxx/test/support/filesystem_test_helper.h
@@ -599,19 +599,19 @@ struct ExceptionChecker {
   const char* func_name;
   std::string opt_message;
 
-  explicit ExceptionChecker(std::errc first_err, const char* func_name,
+  explicit ExceptionChecker(std::errc first_err, const char* fun_name,
                             std::string opt_msg = {})
-      : expected_err{first_err}, num_paths(0), func_name(func_name),
+      : expected_err{first_err}, num_paths(0), func_name(fun_name),
         opt_message(opt_msg) {}
   explicit ExceptionChecker(fs::path p, std::errc first_err,
-                            const char* func_name, std::string opt_msg = {})
+                            const char* fun_name, std::string opt_msg = {})
       : expected_err(first_err), expected_path1(p), num_paths(1),
-        func_name(func_name), opt_message(opt_msg) {}
+        func_name(fun_name), opt_message(opt_msg) {}
 
   explicit ExceptionChecker(fs::path p1, fs::path p2, std::errc first_err,
-                            const char* func_name, std::string opt_msg = {})
+                            const char* fun_name, std::string opt_msg = {})
       : expected_err(first_err), expected_path1(p1), expected_path2(p2),
-        num_paths(2), func_name(func_name), opt_message(opt_msg) {}
+        num_paths(2), func_name(fun_name), opt_message(opt_msg) {}
 
   void operator()(fs::filesystem_error const& Err) {
     TEST_CHECK(ErrorIsImp(Err.code(), {expected_err}));

diff  --git a/libcxx/test/support/unique_ptr_test_helper.h b/libcxx/test/support/unique_ptr_test_helper.h
index 5f56f7123ea4..1613ad197457 100644
--- a/libcxx/test/support/unique_ptr_test_helper.h
+++ b/libcxx/test/support/unique_ptr_test_helper.h
@@ -27,7 +27,7 @@ int A::count = 0;
 struct B : public A {
   static int count;
   B() { ++count; }
-  B(const B&) { ++count; }
+  B(const B& other) : A(other) { ++count; }
   virtual ~B() { --count; }
 };
 


        


More information about the libcxx-commits mailing list