[libcxx-commits] [PATCH] D99214: [libcxx] [test] Add return values after assert(false) in some experimental tests
Martin Storsjö via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Wed Mar 24 02:44:28 PDT 2021
This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rGb6c4b280a01f: [libcxx] [test] Add return values after assert(false) in some experimental tests (authored by mstorsjo).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D99214/new/
https://reviews.llvm.org/D99214
Files:
libcxx/test/std/experimental/memory/memory.resource.global/new_delete_resource.pass.cpp
libcxx/test/std/experimental/memory/memory.resource.global/null_memory_resource.pass.cpp
Index: libcxx/test/std/experimental/memory/memory.resource.global/null_memory_resource.pass.cpp
===================================================================
--- libcxx/test/std/experimental/memory/memory.resource.global/null_memory_resource.pass.cpp
+++ libcxx/test/std/experimental/memory/memory.resource.global/null_memory_resource.pass.cpp
@@ -25,14 +25,14 @@
struct assert_on_compare : public ex::memory_resource
{
protected:
- virtual void * do_allocate(size_t, size_t)
- { assert(false); }
+ void * do_allocate(size_t, size_t) override
+ { assert(false); return nullptr; }
- virtual void do_deallocate(void *, size_t, size_t)
+ void do_deallocate(void *, size_t, size_t) override
{ 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()
Index: libcxx/test/std/experimental/memory/memory.resource.global/new_delete_resource.pass.cpp
===================================================================
--- libcxx/test/std/experimental/memory/memory.resource.global/new_delete_resource.pass.cpp
+++ libcxx/test/std/experimental/memory/memory.resource.global/new_delete_resource.pass.cpp
@@ -25,14 +25,14 @@
struct assert_on_compare : public ex::memory_resource
{
protected:
- virtual void * do_allocate(size_t, size_t)
- { assert(false); }
+ void * do_allocate(size_t, size_t) override
+ { assert(false); return nullptr; }
- virtual void do_deallocate(void *, size_t, size_t)
+ void do_deallocate(void *, size_t, size_t) override
{ 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()
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D99214.332910.patch
Type: text/x-patch
Size: 1955 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20210324/d3721a6a/attachment-0001.bin>
More information about the libcxx-commits
mailing list