Author: ericwf Date: Tue Jun 21 20:02:08 2016 New Revision: 273350 URL: http://llvm.org/viewvc/llvm-project?rev=273350&view=rev Log: Suppress stupid and incorrect MSVC 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=273350&r1=273349&r2=273350&view=diff ============================================================================== --- libcxx/trunk/test/support/test_allocator.h (original) +++ libcxx/trunk/test/support/test_allocator.h Tue Jun 21 20:02:08 2016 @@ -87,7 +87,11 @@ public: template <class U> void construct(pointer p, U&& val) {::new(static_cast<void*>(p)) T(std::forward<U>(val));} #endif - void destroy(pointer p) {p->~T();} + void destroy(pointer p) + { + p->~T(); + ((void)p); // Prevent MSVC's spurious unused warning + } 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) _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits