[libcxx] r348611 - [libcxx] Add paranoid cast-to-void in comma operator

Louis Dionne ldionne at apple.com
Fri Dec 7 08:42:28 PST 2018


Author: ldionne
Date: Fri Dec  7 08:42:28 2018
New Revision: 348611

URL: http://llvm.org/viewvc/llvm-project?rev=348611&view=rev
Log:
[libcxx] Add paranoid cast-to-void in comma operator

Modified:
    libcxx/trunk/include/memory

Modified: libcxx/trunk/include/memory
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/include/memory?rev=348611&r1=348610&r2=348611&view=diff
==============================================================================
--- libcxx/trunk/include/memory (original)
+++ libcxx/trunk/include/memory Fri Dec  7 08:42:28 2018
@@ -1613,7 +1613,7 @@ struct _LIBCPP_TEMPLATE_VIS allocator_tr
         void
         __construct_forward(allocator_type& __a, _Ptr __begin1, _Ptr __end1, _Ptr& __begin2)
         {
-            for (; __begin1 != __end1; ++__begin1, ++__begin2)
+            for (; __begin1 != __end1; ++__begin1, (void) ++__begin2)
                 construct(__a, _VSTD::__to_raw_pointer(__begin2), _VSTD::move_if_noexcept(*__begin1));
         }
 




More information about the libcxx-commits mailing list