[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 00:10:56 PDT 2021
mstorsjo updated this revision to Diff 332877.
mstorsjo added a comment.
Rerun CI after changing virtual into override
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.332877.patch
Type: text/x-patch
Size: 1955 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20210324/1a14547c/attachment.bin>
More information about the libcxx-commits
mailing list