[PATCH] D22818: [libcxx] [test] Silence another occurrence of MSVC's spurious unused warning.
Stephan T. Lavavej via cfe-commits
cfe-commits at lists.llvm.org
Tue Jul 26 09:18:11 PDT 2016
STL_MSFT created this revision.
STL_MSFT added reviewers: EricWF, mclow.lists.
STL_MSFT added a subscriber: cfe-commits.
Silence another occurrence of MSVC's spurious unused warning.
Again, I'm sorry about this one (VSO#188582 tracks the need to fix the compiler), but this targeted suppression helps us run libcxx's tests.
https://reviews.llvm.org/D22818
Files:
test/support/test_allocator.h
Index: test/support/test_allocator.h
===================================================================
--- test/support/test_allocator.h
+++ test/support/test_allocator.h
@@ -291,7 +291,10 @@
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>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D22818.65542.patch
Type: text/x-patch
Size: 416 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20160726/fdd13354/attachment.bin>
More information about the cfe-commits
mailing list