[PATCH] D31966: [libcxx] [test] Avoid Clang's -Wunused-const-variable in is_constructible.pass.cpp.

Stephan T. Lavavej via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Apr 11 17:34:15 PDT 2017


STL_MSFT created this revision.

[libcxx] [test] Avoid Clang's -Wunused-const-variable in is_constructible.pass.cpp.

This happens when using Clang with MSVC's STL, so there are no actual uses of this variable.


https://reviews.llvm.org/D31966

Files:
  test/std/utilities/meta/meta.unary/meta.unary.prop/is_constructible.pass.cpp


Index: test/std/utilities/meta/meta.unary/meta.unary.prop/is_constructible.pass.cpp
===================================================================
--- test/std/utilities/meta/meta.unary/meta.unary.prop/is_constructible.pass.cpp
+++ test/std/utilities/meta/meta.unary/meta.unary.prop/is_constructible.pass.cpp
@@ -251,6 +251,7 @@
     LIBCPP_STATIC_ASSERT(
         clang_disallows_valid_static_cast_bug !=
         std::__libcpp_is_constructible<int&&, ExplicitTo<int&&>>::value, "");
+    ((void)clang_disallows_valid_static_cast_bug); // Prevent unused warning
 #else
     static_assert(clang_disallows_valid_static_cast_bug == false, "");
     LIBCPP_STATIC_ASSERT(std::__libcpp_is_constructible<int&&, ExplicitTo<int&&>>::value, "");


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D31966.94913.patch
Type: text/x-patch
Size: 743 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20170412/1b19814a/attachment.bin>


More information about the cfe-commits mailing list