test: squelch -Wreturn-type error

Add an unreachable marker to avoid a -Wreturn-type error when building
on Windows.

llvm-svn: 294901
This commit is contained in:
Saleem Abdulrasool 2017-02-12 17:37:44 +00:00
parent 04ec0f2b2a
commit 0d467ff53f
1 changed files with 8 additions and 1 deletions

View File

@ -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;