From 0d467ff53f85731aa3da2c87a8ea074a132a862d 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. llvm-svn: 294901 --- .../function.objects/func.not_fn/not_fn.pass.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/libcxx/test/std/utilities/function.objects/func.not_fn/not_fn.pass.cpp b/libcxx/test/std/utilities/function.objects/func.not_fn/not_fn.pass.cpp index 47a3e1cc5969..2b19211be9bf 100644 --- a/libcxx/test/std/utilities/function.objects/func.not_fn/not_fn.pass.cpp +++ b/libcxx/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;