[libcxx] r346912 - [libcxx] [test] Fix Clang -Wunused-local-typedef warnings.

Stephan T. Lavavej stl at exchange.microsoft.com
Wed Nov 14 15:23:55 PST 2018


Author: stl_msft
Date: Wed Nov 14 15:23:55 2018
New Revision: 346912

URL: http://llvm.org/viewvc/llvm-project?rev=346912&view=rev
Log:
[libcxx] [test] Fix Clang -Wunused-local-typedef warnings.

C++11's [hash.requirements] never required these typedefs from users.

Modified:
    libcxx/trunk/test/std/containers/unord/unord.map/unord.map.modifiers/merge.pass.cpp
    libcxx/trunk/test/std/containers/unord/unord.multimap/unord.multimap.modifiers/merge.pass.cpp
    libcxx/trunk/test/std/containers/unord/unord.multiset/merge.pass.cpp
    libcxx/trunk/test/std/containers/unord/unord.set/merge.pass.cpp

Modified: libcxx/trunk/test/std/containers/unord/unord.map/unord.map.modifiers/merge.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/containers/unord/unord.map/unord.map.modifiers/merge.pass.cpp?rev=346912&r1=346911&r2=346912&view=diff
==============================================================================
--- libcxx/trunk/test/std/containers/unord/unord.map/unord.map.modifiers/merge.pass.cpp (original)
+++ libcxx/trunk/test/std/containers/unord/unord.map/unord.map.modifiers/merge.pass.cpp Wed Nov 14 15:23:55 2018
@@ -41,9 +41,6 @@ struct throw_hasher
 
     throw_hasher(bool& should_throw) : should_throw_(should_throw) {}
 
-    typedef size_t result_type;
-    typedef T argument_type;
-
     size_t operator()(const T& p) const
     {
         if (should_throw_)
@@ -99,8 +96,6 @@ int main()
     struct hasher
     {
         hasher() = default;
-        typedef Counter<int> argument_type;
-        typedef size_t result_type;
         size_t operator()(const Counter<int>& p) const
         {
             return std::hash<Counter<int>>()(p);

Modified: libcxx/trunk/test/std/containers/unord/unord.multimap/unord.multimap.modifiers/merge.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/containers/unord/unord.multimap/unord.multimap.modifiers/merge.pass.cpp?rev=346912&r1=346911&r2=346912&view=diff
==============================================================================
--- libcxx/trunk/test/std/containers/unord/unord.multimap/unord.multimap.modifiers/merge.pass.cpp (original)
+++ libcxx/trunk/test/std/containers/unord/unord.multimap/unord.multimap.modifiers/merge.pass.cpp Wed Nov 14 15:23:55 2018
@@ -41,9 +41,6 @@ struct throw_hasher
 
     throw_hasher(bool& should_throw) : should_throw_(should_throw) {}
 
-    typedef size_t result_type;
-    typedef T argument_type;
-
     size_t operator()(const T& p) const
     {
         if (should_throw_)
@@ -99,8 +96,6 @@ int main()
     struct hasher
     {
         hasher() = default;
-        typedef Counter<int> argument_type;
-        typedef size_t result_type;
         size_t operator()(const Counter<int>& p) const
         {
             return std::hash<Counter<int>>()(p);

Modified: libcxx/trunk/test/std/containers/unord/unord.multiset/merge.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/containers/unord/unord.multiset/merge.pass.cpp?rev=346912&r1=346911&r2=346912&view=diff
==============================================================================
--- libcxx/trunk/test/std/containers/unord/unord.multiset/merge.pass.cpp (original)
+++ libcxx/trunk/test/std/containers/unord/unord.multiset/merge.pass.cpp Wed Nov 14 15:23:55 2018
@@ -41,9 +41,6 @@ struct throw_hasher
 
     throw_hasher(bool& should_throw) : should_throw_(should_throw) {}
 
-    typedef size_t result_type;
-    typedef T argument_type;
-
     size_t operator()(const T& p) const
     {
         if (should_throw_)
@@ -99,8 +96,6 @@ int main()
     struct hasher
     {
         hasher() = default;
-        typedef Counter<int> argument_type;
-        typedef size_t result_type;
         size_t operator()(const Counter<int>& p) const { return std::hash<Counter<int>>()(p); }
     };
     {

Modified: libcxx/trunk/test/std/containers/unord/unord.set/merge.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/containers/unord/unord.set/merge.pass.cpp?rev=346912&r1=346911&r2=346912&view=diff
==============================================================================
--- libcxx/trunk/test/std/containers/unord/unord.set/merge.pass.cpp (original)
+++ libcxx/trunk/test/std/containers/unord/unord.set/merge.pass.cpp Wed Nov 14 15:23:55 2018
@@ -41,9 +41,6 @@ struct throw_hasher
 
     throw_hasher(bool& should_throw) : should_throw_(should_throw) {}
 
-    typedef size_t result_type;
-    typedef T argument_type;
-
     size_t operator()(const T& p) const
     {
         if (should_throw_)
@@ -99,8 +96,6 @@ int main()
     struct hasher
     {
         hasher() = default;
-        typedef Counter<int> argument_type;
-        typedef size_t result_type;
         size_t operator()(const Counter<int>& p) const { return std::hash<Counter<int>>()(p); }
     };
     {




More information about the libcxx-commits mailing list