forked from OSchip/llvm-project
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:
parent
04ec0f2b2a
commit
0d467ff53f
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue