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>
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>
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits