From 0849d28af1ece494385c7b74b5fc2f7bf7202b6d Mon Sep 17 00:00:00 2001 From: Saleem Abdulrasool Date: Sun, 12 Feb 2017 17:37:44 +0000 Subject: [PATCH] test: squelch -Wreturn-type error Add an unreachable marker to avoid a -Wreturn-type error when building on Windows. git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@294901 91177308-0d34-0410-b5e6-96231b3b80d8 --- .../function.objects/func.not_fn/not_fn.pass.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/test/std/utilities/function.objects/func.not_fn/not_fn.pass.cpp b/test/std/utilities/function.objects/func.not_fn/not_fn.pass.cpp index 47a3e1cc5..2b19211be 100644 --- a/test/std/utilities/function.objects/func.not_fn/not_fn.pass.cpp +++ b/test/std/utilities/function.objects/func.not_fn/not_fn.pass.cpp @@ -414,7 +414,14 @@ void throws_in_constructor_test() throw 42; } ThrowsOnCopy() = default; - bool operator()() const { assert(false); } + bool operator()() const { + assert(false); +#if defined(_LIBCPP_MSVC) + __assume(0); +#else + __builtin_unreachable(); +#endif + } }; { ThrowsOnCopy cp;