[libcxx] r283580 - Remove MSVC workarounds. Patch from STL at microsoft.com

Eric Fiselier via cfe-commits cfe-commits at lists.llvm.org
Fri Oct 7 11:51:33 PDT 2016


Author: ericwf
Date: Fri Oct  7 13:51:33 2016
New Revision: 283580

URL: http://llvm.org/viewvc/llvm-project?rev=283580&view=rev
Log:
Remove MSVC workarounds. Patch from STL at microsoft.com

Modified:
    libcxx/trunk/test/support/test_allocator.h

Modified: libcxx/trunk/test/support/test_allocator.h
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/support/test_allocator.h?rev=283580&r1=283579&r2=283580&view=diff
==============================================================================
--- libcxx/trunk/test/support/test_allocator.h (original)
+++ libcxx/trunk/test/support/test_allocator.h Fri Oct  7 13:51:33 2016
@@ -88,10 +88,7 @@ public:
         {::new(static_cast<void*>(p)) T(std::forward<U>(val));}
 #endif
     void destroy(pointer p)
-        {
-            p->~T();
-            ((void)p); // Prevent MSVC's spurious unused warning
-        }
+        {p->~T();}
     friend bool operator==(const test_allocator& x, const test_allocator& y)
         {return x.data_ == y.data_;}
     friend bool operator!=(const test_allocator& x, const test_allocator& y)
@@ -291,10 +288,7 @@ public:
 
     template<typename U, typename... Args>
     void destroy(U* p)
-    {
-        p->~U();
-        ((void)p); // Prevent MSVC's spurious unused warning
-    }
+    { p->~U(); }
 };
 
 template<typename T, typename U>




More information about the cfe-commits mailing list