[libcxx] r300079 - [libcxx] [test] Avoid Clang's -Wunused-const-variable in is_constructible.pass.cpp.
Stephan T. Lavavej via cfe-commits
cfe-commits at lists.llvm.org
Wed Apr 12 10:16:38 PDT 2017
Author: stl_msft
Date: Wed Apr 12 12:16:38 2017
New Revision: 300079
URL: http://llvm.org/viewvc/llvm-project?rev=300079&view=rev
Log:
[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.
Fixes D31966.
Modified:
libcxx/trunk/test/std/utilities/meta/meta.unary/meta.unary.prop/is_constructible.pass.cpp
Modified: libcxx/trunk/test/std/utilities/meta/meta.unary/meta.unary.prop/is_constructible.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/utilities/meta/meta.unary/meta.unary.prop/is_constructible.pass.cpp?rev=300079&r1=300078&r2=300079&view=diff
==============================================================================
--- libcxx/trunk/test/std/utilities/meta/meta.unary/meta.unary.prop/is_constructible.pass.cpp (original)
+++ libcxx/trunk/test/std/utilities/meta/meta.unary/meta.unary.prop/is_constructible.pass.cpp Wed Apr 12 12:16:38 2017
@@ -251,6 +251,7 @@ int main()
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, "");
More information about the cfe-commits
mailing list