From 408d6ebd2d332372ee0bdd0e40b3902157ce06dc Mon Sep 17 00:00:00 2001 From: Eric Fiselier Date: Wed, 22 Jun 2016 01:02:08 +0000 Subject: Suppress stupid and incorrect MSVC warning. patch from STL@microsoft.com llvm-svn: 273350 --- libcxx/test/support/test_allocator.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'libcxx/test/support') diff --git a/libcxx/test/support/test_allocator.h b/libcxx/test/support/test_allocator.h index b96e6c5cbf4..551477119c1 100644 --- a/libcxx/test/support/test_allocator.h +++ b/libcxx/test/support/test_allocator.h @@ -87,7 +87,11 @@ public: template void construct(pointer p, U&& val) {::new(static_cast(p)) T(std::forward(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) -- cgit v1.2.3