Author: ericwf
Date: Wed Aug  3 00:46:36 2016
New Revision: 277572

URL: http://llvm.org/viewvc/llvm-project?rev=277572&view=rev
Log:
Silence another occurrence of MSVC's suprious unused warning. Patch from 
s...@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=277572&r1=277571&r2=277572&view=diff
==============================================================================
--- libcxx/trunk/test/support/test_allocator.h (original)
+++ libcxx/trunk/test/support/test_allocator.h Wed Aug  3 00:46:36 2016
@@ -291,7 +291,10 @@ public:
 
     template<typename U, typename... Args>
     void destroy(U* p)
-    { p->~U(); }
+    {
+        p->~U();
+        ((void)p); // Prevent MSVC's spurious unused warning
+    }
 };
 
 template<typename T, typename U>


_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to