diff options
| author | Saleem Abdulrasool <compnerd@compnerd.org> | 2017-02-12 17:37:44 +0000 |
|---|---|---|
| committer | Saleem Abdulrasool <compnerd@compnerd.org> | 2017-02-12 17:37:44 +0000 |
| commit | 0d467ff53f85731aa3da2c87a8ea074a132a862d (patch) | |
| tree | bab0a2d1f483bfb708a7716423ccadb8aed5a878 /libcxx/test/std/utilities/function.objects/func.not_fn | |
| parent | 04ec0f2b2ac9ccfc507f9b085ceef77385386af2 (diff) | |
| download | bcm5719-llvm-0d467ff53f85731aa3da2c87a8ea074a132a862d.tar.gz bcm5719-llvm-0d467ff53f85731aa3da2c87a8ea074a132a862d.zip | |
test: squelch -Wreturn-type error
Add an unreachable marker to avoid a -Wreturn-type error when building
on Windows.
llvm-svn: 294901
Diffstat (limited to 'libcxx/test/std/utilities/function.objects/func.not_fn')
| -rw-r--r-- | libcxx/test/std/utilities/function.objects/func.not_fn/not_fn.pass.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
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 47a3e1cc596..2b19211be9b 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; |

