mirror of
https://github.com/llvm-mirror/libcxx.git
synced 2025-10-23 01:18:52 +08:00
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
This commit is contained in:
@@ -414,7 +414,14 @@ void throws_in_constructor_test()
|
|||||||
throw 42;
|
throw 42;
|
||||||
}
|
}
|
||||||
ThrowsOnCopy() = default;
|
ThrowsOnCopy() = default;
|
||||||
bool operator()() const { assert(false); }
|
bool operator()() const {
|
||||||
|
assert(false);
|
||||||
|
#if defined(_LIBCPP_MSVC)
|
||||||
|
__assume(0);
|
||||||
|
#else
|
||||||
|
__builtin_unreachable();
|
||||||
|
#endif
|
||||||
|
}
|
||||||
};
|
};
|
||||||
{
|
{
|
||||||
ThrowsOnCopy cp;
|
ThrowsOnCopy cp;
|
||||||
|
Reference in New Issue
Block a user