[libcxx] r294901 - test: squelch -Wreturn-type error
Saleem Abdulrasool via cfe-commits
cfe-commits at lists.llvm.org
Sun Feb 12 09:37:44 PST 2017
Author: compnerd
Date: Sun Feb 12 11:37:44 2017
New Revision: 294901
URL: http://llvm.org/viewvc/llvm-project?rev=294901&view=rev
Log:
test: squelch -Wreturn-type error
Add an unreachable marker to avoid a -Wreturn-type error when building
on Windows.
Modified:
libcxx/trunk/test/std/utilities/function.objects/func.not_fn/not_fn.pass.cpp
Modified: libcxx/trunk/test/std/utilities/function.objects/func.not_fn/not_fn.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/utilities/function.objects/func.not_fn/not_fn.pass.cpp?rev=294901&r1=294900&r2=294901&view=diff
==============================================================================
--- libcxx/trunk/test/std/utilities/function.objects/func.not_fn/not_fn.pass.cpp (original)
+++ libcxx/trunk/test/std/utilities/function.objects/func.not_fn/not_fn.pass.cpp Sun Feb 12 11:37:44 2017
@@ -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;
More information about the cfe-commits
mailing list