[PATCH] D21581: [libcxx] [test] Silence unused variable warnings in invoke.pass.cpp.
Stephan T. Lavavej via cfe-commits
cfe-commits at lists.llvm.org
Tue Jun 21 17:48:36 PDT 2016
STL_MSFT created this revision.
STL_MSFT added reviewers: EricWF, mclow.lists.
STL_MSFT added a subscriber: cfe-commits.
Silence unused variable warnings in invoke.pass.cpp.
Fixes MSVC warning C4101 "unreferenced local variable".
http://reviews.llvm.org/D21581
Files:
test/std/utilities/function.objects/func.invoke/invoke.pass.cpp
Index: test/std/utilities/function.objects/func.invoke/invoke.pass.cpp
===================================================================
--- test/std/utilities/function.objects/func.invoke/invoke.pass.cpp
+++ test/std/utilities/function.objects/func.invoke/invoke.pass.cpp
@@ -326,13 +326,15 @@
void noexcept_test() {
{
NoThrowCallable obj;
+ ((void)obj); // Prevent unused warning
CopyThrows arg;
static_assert(noexcept(std::invoke(obj)), "");
static_assert(!noexcept(std::invoke(obj, arg)), "");
static_assert(noexcept(std::invoke(obj, std::move(arg))), "");
}
{
ThrowsCallable obj;
+ ((void)obj); // Prevent unused warning
static_assert(!noexcept(std::invoke(obj)), "");
}
{
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D21581.61474.patch
Type: text/x-patch
Size: 783 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20160622/56a2d87b/attachment.bin>
More information about the cfe-commits
mailing list