summaryrefslogtreecommitdiffstats
path: root/libcxx/test/support
diff options
context:
space:
mode:
authorEric Fiselier <eric@efcs.ca>2016-06-22 01:02:08 +0000
committerEric Fiselier <eric@efcs.ca>2016-06-22 01:02:08 +0000
commit408d6ebd2d332372ee0bdd0e40b3902157ce06dc (patch)
treef7aba6d3c36c1bb73ae9d217b0ef1d05ae03d58e /libcxx/test/support
parentdf839e04b40a7ab7c71cd4940b02132a590066ce (diff)
downloadbcm5719-llvm-408d6ebd2d332372ee0bdd0e40b3902157ce06dc.tar.gz
bcm5719-llvm-408d6ebd2d332372ee0bdd0e40b3902157ce06dc.zip
Suppress stupid and incorrect MSVC warning. patch from STL@microsoft.com
llvm-svn: 273350
Diffstat (limited to 'libcxx/test/support')
-rw-r--r--libcxx/test/support/test_allocator.h6
1 files changed, 5 insertions, 1 deletions
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 <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)
OpenPOWER on IntegriCloud