[libcxx-commits] [PATCH] D144775: [libc++][test] Add '-Wdeprecated-copy', '-Wdeprecated-copy-dtor' warnings to the test suite

Mark de Wever via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Sun Feb 26 05:23:44 PST 2023


Mordante added a comment.

Thanks for working on this!
I assume this fixes https://github.com/llvm/llvm-project/issues/60977. If so can you mention it in the commit message?



================
Comment at: libcxx/test/libcxx/memory/trivial_abi/unique_ptr_destruction_order.pass.cpp:30
+  Base(const Base& other) = default;
+  Base& operator=(const Base&) = default;
   ~Base() { shared_buff[(*cur_idx)++] = id; }
----------------
Can these be deleted instead? I assume the `id` was intentionally const qualified.


================
Comment at: libcxx/test/support/counting_predicates.h:24
+    unary_counting_predicate(const unary_counting_predicate&) = default;
+    unary_counting_predicate& operator=(const unary_counting_predicate&) = default;
     ~unary_counting_predicate() {}
----------------
Are they used? Copying the `count_` seems wrong.

The same for copies of other stateful parts in the tests.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D144775/new/

https://reviews.llvm.org/D144775



More information about the libcxx-commits mailing list