[libcxx] r267852 - Remove names of unreferenced parameters. Patch from STL at microsoft.com

Eric Fiselier via cfe-commits cfe-commits at lists.llvm.org
Wed Apr 27 20:17:58 PDT 2016


Author: ericwf
Date: Wed Apr 27 22:17:56 2016
New Revision: 267852

URL: http://llvm.org/viewvc/llvm-project?rev=267852&view=rev
Log:
Remove names of unreferenced parameters. Patch from STL at microsoft.com

Modified:
    libcxx/trunk/test/std/algorithms/alg.sorting/alg.min.max/minmax_init_list_comp.pass.cpp
    libcxx/trunk/test/std/containers/sequences/vector/vector.cons/construct_iter_iter_alloc.pass.cpp
    libcxx/trunk/test/std/depr/depr.str.strstreams/depr.strstreambuf/depr.strstreambuf.cons/custom_alloc.pass.cpp
    libcxx/trunk/test/std/diagnostics/syserr/syserr.errcat/syserr.errcat.nonvirtuals/default_ctor.pass.cpp
    libcxx/trunk/test/std/input.output/iostream.format/input.streams/istream.unformatted/seekg_off.pass.cpp
    libcxx/trunk/test/std/input.output/stream.buffers/streambuf/streambuf.members/streambuf.pub.get/sgetn.pass.cpp
    libcxx/trunk/test/std/input.output/stream.buffers/streambuf/streambuf.members/streambuf.pub.pback/sputbackc.pass.cpp
    libcxx/trunk/test/std/input.output/stream.buffers/streambuf/streambuf.members/streambuf.pub.pback/sungetc.pass.cpp
    libcxx/trunk/test/std/input.output/stream.buffers/streambuf/streambuf.members/streambuf.pub.put/sputc.pass.cpp
    libcxx/trunk/test/std/input.output/stream.buffers/streambuf/streambuf.members/streambuf.pub.put/sputn.pass.cpp
    libcxx/trunk/test/std/utilities/function.objects/bind/func.bind/func.bind.bind/PR23141_invoke_not_constexpr.pass.cpp
    libcxx/trunk/test/std/utilities/function.objects/bind/func.bind/func.bind.bind/invoke_function_object.pass.cpp
    libcxx/trunk/test/std/utilities/intseq/intseq.general/integer_seq.pass.cpp
    libcxx/trunk/test/std/utilities/tuple/tuple.tuple/tuple.creation/forward_as_tuple.pass.cpp
    libcxx/trunk/test/support/allocators.h
    libcxx/trunk/test/support/test_allocator.h

Modified: libcxx/trunk/test/std/algorithms/alg.sorting/alg.min.max/minmax_init_list_comp.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/algorithms/alg.sorting/alg.min.max/minmax_init_list_comp.pass.cpp?rev=267852&r1=267851&r2=267852&view=diff
==============================================================================
--- libcxx/trunk/test/std/algorithms/alg.sorting/alg.min.max/minmax_init_list_comp.pass.cpp (original)
+++ libcxx/trunk/test/std/algorithms/alg.sorting/alg.min.max/minmax_init_list_comp.pass.cpp Wed Apr 27 22:17:56 2016
@@ -21,7 +21,7 @@
 
 #include "counting_predicates.hpp"
 
-bool all_equal(int a, int b) { return false; } // everything is equal
+bool all_equal(int, int) { return false; } // everything is equal
 
 #ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
 void test_all_equal(std::initializer_list<int> il)

Modified: libcxx/trunk/test/std/containers/sequences/vector/vector.cons/construct_iter_iter_alloc.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/containers/sequences/vector/vector.cons/construct_iter_iter_alloc.pass.cpp?rev=267852&r1=267851&r2=267852&view=diff
==============================================================================
--- libcxx/trunk/test/std/containers/sequences/vector/vector.cons/construct_iter_iter_alloc.pass.cpp (original)
+++ libcxx/trunk/test/std/containers/sequences/vector/vector.cons/construct_iter_iter_alloc.pass.cpp Wed Apr 27 22:17:56 2016
@@ -37,7 +37,7 @@ test(Iterator first, Iterator last, cons
 template <class T>
 struct implicit_conv_allocator : min_allocator<T>
 {
-    implicit_conv_allocator(void* p) {}
+    implicit_conv_allocator(void*) {}
     implicit_conv_allocator(const implicit_conv_allocator&) = default;
 };
 

Modified: libcxx/trunk/test/std/depr/depr.str.strstreams/depr.strstreambuf/depr.strstreambuf.cons/custom_alloc.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/depr/depr.str.strstreams/depr.strstreambuf/depr.strstreambuf.cons/custom_alloc.pass.cpp?rev=267852&r1=267851&r2=267852&view=diff
==============================================================================
--- libcxx/trunk/test/std/depr/depr.str.strstreams/depr.strstreambuf/depr.strstreambuf.cons/custom_alloc.pass.cpp (original)
+++ libcxx/trunk/test/std/depr/depr.str.strstreams/depr.strstreambuf/depr.strstreambuf.cons/custom_alloc.pass.cpp Wed Apr 27 22:17:56 2016
@@ -18,7 +18,7 @@
 
 int called = 0;
 
-void* my_alloc(std::size_t n)
+void* my_alloc(std::size_t)
 {
     static char buf[10000];
     ++called;

Modified: libcxx/trunk/test/std/diagnostics/syserr/syserr.errcat/syserr.errcat.nonvirtuals/default_ctor.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/diagnostics/syserr/syserr.errcat/syserr.errcat.nonvirtuals/default_ctor.pass.cpp?rev=267852&r1=267851&r2=267852&view=diff
==============================================================================
--- libcxx/trunk/test/std/diagnostics/syserr/syserr.errcat/syserr.errcat.nonvirtuals/default_ctor.pass.cpp (original)
+++ libcxx/trunk/test/std/diagnostics/syserr/syserr.errcat/syserr.errcat.nonvirtuals/default_ctor.pass.cpp Wed Apr 27 22:17:56 2016
@@ -26,7 +26,7 @@ class test1
 public:
     constexpr test1() = default;  // won't compile if error_category() is not constexpr
     virtual const char* name() const noexcept {return nullptr;}
-    virtual std::string message(int ev) const {return std::string();}
+    virtual std::string message(int) const {return std::string();}
 };
 
 #endif  // _LIBCPP_STD_VER > 11

Modified: libcxx/trunk/test/std/input.output/iostream.format/input.streams/istream.unformatted/seekg_off.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/input.output/iostream.format/input.streams/istream.unformatted/seekg_off.pass.cpp?rev=267852&r1=267851&r2=267852&view=diff
==============================================================================
--- libcxx/trunk/test/std/input.output/iostream.format/input.streams/istream.unformatted/seekg_off.pass.cpp (original)
+++ libcxx/trunk/test/std/input.output/iostream.format/input.streams/istream.unformatted/seekg_off.pass.cpp Wed Apr 27 22:17:56 2016
@@ -40,7 +40,7 @@ public:
     CharT* egptr() const {return base::egptr();}
 protected:
     typename base::pos_type seekoff(typename base::off_type off,
-                                    std::ios_base::seekdir way,
+                                    std::ios_base::seekdir,
                                     std::ios_base::openmode which)
     {
         assert(which == std::ios_base::in);

Modified: libcxx/trunk/test/std/input.output/stream.buffers/streambuf/streambuf.members/streambuf.pub.get/sgetn.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/input.output/stream.buffers/streambuf/streambuf.members/streambuf.pub.get/sgetn.pass.cpp?rev=267852&r1=267851&r2=267852&view=diff
==============================================================================
--- libcxx/trunk/test/std/input.output/stream.buffers/streambuf/streambuf.members/streambuf.pub.get/sgetn.pass.cpp (original)
+++ libcxx/trunk/test/std/input.output/stream.buffers/streambuf/streambuf.members/streambuf.pub.get/sgetn.pass.cpp Wed Apr 27 22:17:56 2016
@@ -25,7 +25,7 @@ struct test
     test() {}
 
 protected:
-    std::streamsize xsgetn(char_type* s, std::streamsize n)
+    std::streamsize xsgetn(char_type*, std::streamsize)
     {
         ++xsgetn_called;
         return 10;

Modified: libcxx/trunk/test/std/input.output/stream.buffers/streambuf/streambuf.members/streambuf.pub.pback/sputbackc.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/input.output/stream.buffers/streambuf/streambuf.members/streambuf.pub.pback/sputbackc.pass.cpp?rev=267852&r1=267851&r2=267852&view=diff
==============================================================================
--- libcxx/trunk/test/std/input.output/stream.buffers/streambuf/streambuf.members/streambuf.pub.pback/sputbackc.pass.cpp (original)
+++ libcxx/trunk/test/std/input.output/stream.buffers/streambuf/streambuf.members/streambuf.pub.pback/sputbackc.pass.cpp Wed Apr 27 22:17:56 2016
@@ -32,7 +32,7 @@ struct test
     }
 
 protected:
-    int_type pbackfail(int_type c = traits_type::eof())
+    int_type pbackfail(int_type = traits_type::eof())
     {
         ++pbackfail_called;
         return 'a';

Modified: libcxx/trunk/test/std/input.output/stream.buffers/streambuf/streambuf.members/streambuf.pub.pback/sungetc.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/input.output/stream.buffers/streambuf/streambuf.members/streambuf.pub.pback/sungetc.pass.cpp?rev=267852&r1=267851&r2=267852&view=diff
==============================================================================
--- libcxx/trunk/test/std/input.output/stream.buffers/streambuf/streambuf.members/streambuf.pub.pback/sungetc.pass.cpp (original)
+++ libcxx/trunk/test/std/input.output/stream.buffers/streambuf/streambuf.members/streambuf.pub.pback/sungetc.pass.cpp Wed Apr 27 22:17:56 2016
@@ -32,7 +32,7 @@ struct test
     }
 
 protected:
-    int_type pbackfail(int_type c = traits_type::eof())
+    int_type pbackfail(int_type = traits_type::eof())
     {
         ++pbackfail_called;
         return 'a';

Modified: libcxx/trunk/test/std/input.output/stream.buffers/streambuf/streambuf.members/streambuf.pub.put/sputc.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/input.output/stream.buffers/streambuf/streambuf.members/streambuf.pub.put/sputc.pass.cpp?rev=267852&r1=267851&r2=267852&view=diff
==============================================================================
--- libcxx/trunk/test/std/input.output/stream.buffers/streambuf/streambuf.members/streambuf.pub.put/sputc.pass.cpp (original)
+++ libcxx/trunk/test/std/input.output/stream.buffers/streambuf/streambuf.members/streambuf.pub.put/sputc.pass.cpp Wed Apr 27 22:17:56 2016
@@ -36,7 +36,7 @@ struct test
     }
 
 protected:
-    int_type overflow(int_type c = traits_type::eof())
+    int_type overflow(int_type = traits_type::eof())
     {
         ++overflow_called;
         return 'a';

Modified: libcxx/trunk/test/std/input.output/stream.buffers/streambuf/streambuf.members/streambuf.pub.put/sputn.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/input.output/stream.buffers/streambuf/streambuf.members/streambuf.pub.put/sputn.pass.cpp?rev=267852&r1=267851&r2=267852&view=diff
==============================================================================
--- libcxx/trunk/test/std/input.output/stream.buffers/streambuf/streambuf.members/streambuf.pub.put/sputn.pass.cpp (original)
+++ libcxx/trunk/test/std/input.output/stream.buffers/streambuf/streambuf.members/streambuf.pub.put/sputn.pass.cpp Wed Apr 27 22:17:56 2016
@@ -25,7 +25,7 @@ struct test
     test() {}
 
 protected:
-    std::streamsize xsputn(const char_type* s, std::streamsize n)
+    std::streamsize xsputn(const char_type*, std::streamsize)
     {
         ++xsputn_called;
         return 5;

Modified: libcxx/trunk/test/std/utilities/function.objects/bind/func.bind/func.bind.bind/PR23141_invoke_not_constexpr.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/utilities/function.objects/bind/func.bind/func.bind.bind/PR23141_invoke_not_constexpr.pass.cpp?rev=267852&r1=267851&r2=267852&view=diff
==============================================================================
--- libcxx/trunk/test/std/utilities/function.objects/bind/func.bind/func.bind.bind/PR23141_invoke_not_constexpr.pass.cpp (original)
+++ libcxx/trunk/test/std/utilities/function.objects/bind/func.bind/func.bind.bind/PR23141_invoke_not_constexpr.pass.cpp Wed Apr 27 22:17:56 2016
@@ -23,7 +23,7 @@
 struct Fun
 {
   template<typename T, typename U>
-  void operator()(T && t, U && u) const
+  void operator()(T &&, U &&) const
   {
     static_assert(std::is_same<U, int &>::value, "");
   }

Modified: libcxx/trunk/test/std/utilities/function.objects/bind/func.bind/func.bind.bind/invoke_function_object.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/utilities/function.objects/bind/func.bind/func.bind.bind/invoke_function_object.pass.cpp?rev=267852&r1=267851&r2=267852&view=diff
==============================================================================
--- libcxx/trunk/test/std/utilities/function.objects/bind/func.bind/func.bind.bind/invoke_function_object.pass.cpp (original)
+++ libcxx/trunk/test/std/utilities/function.objects/bind/func.bind/func.bind.bind/invoke_function_object.pass.cpp Wed Apr 27 22:17:56 2016
@@ -23,7 +23,7 @@
 struct DummyUnaryFunction
 {
     template <typename S>
-    int operator()(S const & s) const { return 0; }
+    int operator()(S const &) const { return 0; }
 };
 
 struct BadUnaryFunction
@@ -39,7 +39,7 @@ struct BadUnaryFunction
     }
 };
 
-int main(int argc, char* argv[])
+int main()
 {
     // Check that BadUnaryFunction::operator()(S const &) is not
     // instantiated when checking if BadUnaryFunction is a nested bind

Modified: libcxx/trunk/test/std/utilities/intseq/intseq.general/integer_seq.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/utilities/intseq/intseq.general/integer_seq.pass.cpp?rev=267852&r1=267851&r2=267852&view=diff
==============================================================================
--- libcxx/trunk/test/std/utilities/intseq/intseq.general/integer_seq.pass.cpp (original)
+++ libcxx/trunk/test/std/utilities/intseq/intseq.general/integer_seq.pass.cpp Wed Apr 27 22:17:56 2016
@@ -19,7 +19,7 @@
 #if _LIBCPP_STD_VER > 11
 
 template <typename AtContainer, typename T, T... I>
-auto extract ( const AtContainer &t, const std::integer_sequence<T, I...> idx )
+auto extract ( const AtContainer &t, const std::integer_sequence<T, I...> )
 -> decltype ( std::make_tuple ( std::get<I>(t)... ))
 {     return  std::make_tuple ( std::get<I>(t)... ); }
 

Modified: libcxx/trunk/test/std/utilities/tuple/tuple.tuple/tuple.creation/forward_as_tuple.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/utilities/tuple/tuple.tuple/tuple.creation/forward_as_tuple.pass.cpp?rev=267852&r1=267851&r2=267852&view=diff
==============================================================================
--- libcxx/trunk/test/std/utilities/tuple/tuple.tuple/tuple.creation/forward_as_tuple.pass.cpp (original)
+++ libcxx/trunk/test/std/utilities/tuple/tuple.tuple/tuple.creation/forward_as_tuple.pass.cpp Wed Apr 27 22:17:56 2016
@@ -20,7 +20,7 @@
 
 template <class Tuple>
 void
-test0(const Tuple& t)
+test0(const Tuple&)
 {
     static_assert(std::tuple_size<Tuple>::value == 0, "");
 }
@@ -57,7 +57,7 @@ test2a(const Tuple& t)
 #if _LIBCPP_STD_VER > 11
 template <class Tuple>
 constexpr int 
-test3(const Tuple& t)
+test3(const Tuple&)
 {
     return std::tuple_size<Tuple>::value;
 }

Modified: libcxx/trunk/test/support/allocators.h
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/support/allocators.h?rev=267852&r1=267851&r2=267852&view=diff
==============================================================================
--- libcxx/trunk/test/support/allocators.h (original)
+++ libcxx/trunk/test/support/allocators.h Wed Apr 27 22:17:56 2016
@@ -101,7 +101,7 @@ public:
     A2& operator=(const A2& a) TEST_NOEXCEPT { id_ = a.id(); copy_called = true; return *this;}
     A2& operator=(A2&& a)      TEST_NOEXCEPT { id_ = a.id(); move_called = true; return *this;}
 
-    T* allocate(std::size_t n, const void* hint)
+    T* allocate(std::size_t, const void* hint)
     {
         allocate_called = true;
         return (T*)hint;

Modified: libcxx/trunk/test/support/test_allocator.h
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/support/test_allocator.h?rev=267852&r1=267851&r2=267852&view=diff
==============================================================================
--- libcxx/trunk/test/support/test_allocator.h (original)
+++ libcxx/trunk/test/support/test_allocator.h Wed Apr 27 22:17:56 2016
@@ -76,7 +76,7 @@ public:
             ++alloc_count;
             return (pointer)::operator new(n * sizeof(T));
         }
-    void deallocate(pointer p, size_type n)
+    void deallocate(pointer p, size_type)
         {assert(data_ >= 0); --alloc_count; ::operator delete((void*)p);}
     size_type max_size() const throw()
         {return UINT_MAX / sizeof(T);}
@@ -136,7 +136,7 @@ public:
             ++alloc_count;
             return (pointer)::operator new (n * sizeof(T));
         }
-    void deallocate(pointer p, size_type n)
+    void deallocate(pointer p, size_type)
         {assert(data_ >= 0); --alloc_count; ::operator delete((void*)p); }
     size_type max_size() const throw()
         {return UINT_MAX / sizeof(T);}
@@ -201,7 +201,7 @@ public:
         : data_(a.data_) {}
     T* allocate(std::size_t n)
         {return (T*)::operator new(n * sizeof(T));}
-    void deallocate(T* p, std::size_t n)
+    void deallocate(T* p, std::size_t)
         {::operator delete((void*)p);}
 
     other_allocator select_on_container_copy_construction() const




More information about the cfe-commits mailing list