forked from OSchip/llvm-project
[libcxx] [test] Add return values after assert(false) in some experimental tests
When building in MSVC mode (in release mode), the assert(false) don't make the end of the function unreachable, so add return statements to silence compiler warnings (treated as errors). Also change 'virtual' into 'override', which was requested in review, as these files require C++11. Differential Revision: https://reviews.llvm.org/D99214
This commit is contained in:
parent
c68a645acb
commit
b6c4b280a0
|
@ -25,14 +25,14 @@ namespace ex = std::experimental::pmr;
|
|||
struct assert_on_compare : public ex::memory_resource
|
||||
{
|
||||
protected:
|
||||
virtual void * do_allocate(size_t, size_t)
|
||||
void * do_allocate(size_t, size_t) override
|
||||
{ assert(false); return nullptr; }
|
||||
|
||||
void do_deallocate(void *, size_t, size_t) override
|
||||
{ assert(false); }
|
||||
|
||||
virtual void do_deallocate(void *, size_t, size_t)
|
||||
{ assert(false); }
|
||||
|
||||
virtual bool do_is_equal(ex::memory_resource const &) const noexcept
|
||||
{ assert(false); }
|
||||
bool do_is_equal(ex::memory_resource const &) const noexcept override
|
||||
{ assert(false); return false; }
|
||||
};
|
||||
|
||||
void test_return()
|
||||
|
|
|
@ -25,14 +25,14 @@ namespace ex = std::experimental::pmr;
|
|||
struct assert_on_compare : public ex::memory_resource
|
||||
{
|
||||
protected:
|
||||
virtual void * do_allocate(size_t, size_t)
|
||||
void * do_allocate(size_t, size_t) override
|
||||
{ assert(false); return nullptr; }
|
||||
|
||||
void do_deallocate(void *, size_t, size_t) override
|
||||
{ assert(false); }
|
||||
|
||||
virtual void do_deallocate(void *, size_t, size_t)
|
||||
{ assert(false); }
|
||||
|
||||
virtual bool do_is_equal(ex::memory_resource const &) const noexcept
|
||||
{ assert(false); }
|
||||
bool do_is_equal(ex::memory_resource const &) const noexcept override
|
||||
{ assert(false); return false; }
|
||||
};
|
||||
|
||||
void test_return()
|
||||
|
|
Loading…
Reference in New Issue