diff --git a/libcxx/include/__exception/exception.h b/libcxx/include/__exception/exception.h --- a/libcxx/include/__exception/exception.h +++ b/libcxx/include/__exception/exception.h @@ -72,7 +72,8 @@ class _LIBCPP_EXPORTED_FROM_ABI exception { public: _LIBCPP_HIDE_FROM_ABI exception() _NOEXCEPT {} - _LIBCPP_HIDE_FROM_ABI exception(const exception&) _NOEXCEPT = default; + _LIBCPP_HIDE_FROM_ABI exception(const exception&) _NOEXCEPT = default; + _LIBCPP_HIDE_FROM_ABI exception& operator=(const exception&) _NOEXCEPT = default; virtual ~exception() _NOEXCEPT; virtual const char* what() const _NOEXCEPT; @@ -81,6 +82,8 @@ class _LIBCPP_EXPORTED_FROM_ABI bad_exception : public exception { public: _LIBCPP_HIDE_FROM_ABI bad_exception() _NOEXCEPT {} + _LIBCPP_HIDE_FROM_ABI bad_exception(const bad_exception&) _NOEXCEPT = default; + _LIBCPP_HIDE_FROM_ABI bad_exception& operator=(const bad_exception&) _NOEXCEPT = default; ~bad_exception() _NOEXCEPT override; const char* what() const _NOEXCEPT override; }; diff --git a/libcxx/include/__exception/nested_exception.h b/libcxx/include/__exception/nested_exception.h --- a/libcxx/include/__exception/nested_exception.h +++ b/libcxx/include/__exception/nested_exception.h @@ -33,8 +33,8 @@ public: nested_exception() _NOEXCEPT; - // nested_exception(const nested_exception&) noexcept = default; - // nested_exception& operator=(const nested_exception&) noexcept = default; + _LIBCPP_HIDE_FROM_ABI nested_exception(const nested_exception&) _NOEXCEPT = default; + _LIBCPP_HIDE_FROM_ABI nested_exception& operator=(const nested_exception&) _NOEXCEPT = default; virtual ~nested_exception() _NOEXCEPT; // access functions diff --git a/libcxx/include/__expected/expected.h b/libcxx/include/__expected/expected.h --- a/libcxx/include/__expected/expected.h +++ b/libcxx/include/__expected/expected.h @@ -928,6 +928,8 @@ requires(is_trivially_move_constructible_v<_ValueType> && is_trivially_move_constructible_v<_ErrorType>) union __union_t<_ValueType, _ErrorType> { _LIBCPP_HIDE_FROM_ABI constexpr __union_t() : __empty_() {} + _LIBCPP_HIDE_FROM_ABI constexpr __union_t(const __union_t&) = default; + _LIBCPP_HIDE_FROM_ABI constexpr __union_t& operator=(const __union_t&) = default; template _LIBCPP_HIDE_FROM_ABI constexpr explicit __union_t( @@ -1529,6 +1531,8 @@ requires is_trivially_move_constructible_v<_ErrorType> union __union_t<_ErrorType> { _LIBCPP_HIDE_FROM_ABI constexpr __union_t() : __empty_() {} + _LIBCPP_HIDE_FROM_ABI constexpr __union_t(const __union_t&) = default; + _LIBCPP_HIDE_FROM_ABI constexpr __union_t& operator=(const __union_t&) = default; template _LIBCPP_HIDE_FROM_ABI constexpr explicit __union_t( diff --git a/libcxx/include/__format/format_error.h b/libcxx/include/__format/format_error.h --- a/libcxx/include/__format/format_error.h +++ b/libcxx/include/__format/format_error.h @@ -30,6 +30,8 @@ : runtime_error(__s) {} _LIBCPP_HIDE_FROM_ABI explicit format_error(const char* __s) : runtime_error(__s) {} + _LIBCPP_HIDE_FROM_ABI format_error(const format_error&) = default; + _LIBCPP_HIDE_FROM_ABI format_error& operator=(const format_error&) = default; _LIBCPP_HIDE_FROM_ABI_VIRTUAL ~format_error() noexcept override = default; }; diff --git a/libcxx/include/__functional/function.h b/libcxx/include/__functional/function.h --- a/libcxx/include/__functional/function.h +++ b/libcxx/include/__functional/function.h @@ -57,6 +57,9 @@ : public exception { public: + _LIBCPP_HIDE_FROM_ABI bad_function_call() _NOEXCEPT = default; + _LIBCPP_HIDE_FROM_ABI bad_function_call(const bad_function_call&) _NOEXCEPT = default; + _LIBCPP_HIDE_FROM_ABI bad_function_call& operator=(const bad_function_call&) _NOEXCEPT = default; // Note that when a key function is not used, every translation unit that uses // bad_function_call will end up containing a weak definition of the vtable and // typeinfo. diff --git a/libcxx/include/__memory/shared_ptr.h b/libcxx/include/__memory/shared_ptr.h --- a/libcxx/include/__memory/shared_ptr.h +++ b/libcxx/include/__memory/shared_ptr.h @@ -126,6 +126,7 @@ public: _LIBCPP_HIDE_FROM_ABI bad_weak_ptr() _NOEXCEPT = default; _LIBCPP_HIDE_FROM_ABI bad_weak_ptr(const bad_weak_ptr&) _NOEXCEPT = default; + _LIBCPP_HIDE_FROM_ABI bad_weak_ptr& operator=(const bad_weak_ptr&) _NOEXCEPT = default; ~bad_weak_ptr() _NOEXCEPT override; const char* what() const _NOEXCEPT override; }; diff --git a/libcxx/include/new b/libcxx/include/new --- a/libcxx/include/new +++ b/libcxx/include/new @@ -133,6 +133,8 @@ { public: bad_alloc() _NOEXCEPT; + _LIBCPP_HIDE_FROM_ABI bad_alloc(const bad_alloc&) _NOEXCEPT = default; + _LIBCPP_HIDE_FROM_ABI bad_alloc& operator=(const bad_alloc&) _NOEXCEPT = default; ~bad_alloc() _NOEXCEPT override; const char* what() const _NOEXCEPT override; }; @@ -142,6 +144,8 @@ { public: bad_array_new_length() _NOEXCEPT; + _LIBCPP_HIDE_FROM_ABI bad_array_new_length(const bad_array_new_length&) _NOEXCEPT = default; + _LIBCPP_HIDE_FROM_ABI bad_array_new_length& operator=(const bad_array_new_length&) _NOEXCEPT = default; ~bad_array_new_length() _NOEXCEPT override; const char* what() const _NOEXCEPT override; }; diff --git a/libcxx/include/optional b/libcxx/include/optional --- a/libcxx/include/optional +++ b/libcxx/include/optional @@ -249,6 +249,9 @@ : public exception { public: + _LIBCPP_HIDE_FROM_ABI bad_optional_access() _NOEXCEPT = default; + _LIBCPP_HIDE_FROM_ABI bad_optional_access(const bad_optional_access&) _NOEXCEPT = default; + _LIBCPP_HIDE_FROM_ABI bad_optional_access& operator=(const bad_optional_access&) _NOEXCEPT = default; // Get the key function ~bad_optional_access() into the dylib ~bad_optional_access() _NOEXCEPT override; const char* what() const _NOEXCEPT override; diff --git a/libcxx/include/stdexcept b/libcxx/include/stdexcept --- a/libcxx/include/stdexcept +++ b/libcxx/include/stdexcept @@ -129,6 +129,7 @@ #ifndef _LIBCPP_ABI_VCRUNTIME _LIBCPP_HIDE_FROM_ABI domain_error(const domain_error&) _NOEXCEPT = default; + _LIBCPP_HIDE_FROM_ABI domain_error& operator=(const domain_error&) _NOEXCEPT = default; ~domain_error() _NOEXCEPT override; #endif }; @@ -142,6 +143,7 @@ #ifndef _LIBCPP_ABI_VCRUNTIME _LIBCPP_HIDE_FROM_ABI invalid_argument(const invalid_argument&) _NOEXCEPT = default; + _LIBCPP_HIDE_FROM_ABI invalid_argument& operator=(const invalid_argument&) _NOEXCEPT = default; ~invalid_argument() _NOEXCEPT override; #endif }; @@ -154,6 +156,7 @@ _LIBCPP_INLINE_VISIBILITY explicit length_error(const char* __s) : logic_error(__s) {} #ifndef _LIBCPP_ABI_VCRUNTIME _LIBCPP_HIDE_FROM_ABI length_error(const length_error&) _NOEXCEPT = default; + _LIBCPP_HIDE_FROM_ABI length_error& operator=(const length_error&) _NOEXCEPT = default; ~length_error() _NOEXCEPT override; #endif }; @@ -167,6 +170,7 @@ #ifndef _LIBCPP_ABI_VCRUNTIME _LIBCPP_HIDE_FROM_ABI out_of_range(const out_of_range&) _NOEXCEPT = default; + _LIBCPP_HIDE_FROM_ABI out_of_range& operator=(const out_of_range&) _NOEXCEPT = default; ~out_of_range() _NOEXCEPT override; #endif }; @@ -180,6 +184,7 @@ #ifndef _LIBCPP_ABI_VCRUNTIME _LIBCPP_HIDE_FROM_ABI range_error(const range_error&) _NOEXCEPT = default; + _LIBCPP_HIDE_FROM_ABI range_error& operator=(const range_error&) _NOEXCEPT = default; ~range_error() _NOEXCEPT override; #endif }; @@ -193,6 +198,7 @@ #ifndef _LIBCPP_ABI_VCRUNTIME _LIBCPP_HIDE_FROM_ABI overflow_error(const overflow_error&) _NOEXCEPT = default; + _LIBCPP_HIDE_FROM_ABI overflow_error& operator=(const overflow_error&) _NOEXCEPT = default; ~overflow_error() _NOEXCEPT override; #endif }; @@ -206,6 +212,7 @@ #ifndef _LIBCPP_ABI_VCRUNTIME _LIBCPP_HIDE_FROM_ABI underflow_error(const underflow_error&) _NOEXCEPT = default; + _LIBCPP_HIDE_FROM_ABI underflow_error& operator=(const underflow_error&) _NOEXCEPT = default; ~underflow_error() _NOEXCEPT override; #endif }; diff --git a/libcxx/include/typeinfo b/libcxx/include/typeinfo --- a/libcxx/include/typeinfo +++ b/libcxx/include/typeinfo @@ -360,6 +360,7 @@ public: bad_cast() _NOEXCEPT; _LIBCPP_HIDE_FROM_ABI bad_cast(const bad_cast&) _NOEXCEPT = default; + _LIBCPP_HIDE_FROM_ABI bad_cast& operator=(const bad_cast&) _NOEXCEPT = default; ~bad_cast() _NOEXCEPT override; const char* what() const _NOEXCEPT override; }; @@ -369,6 +370,8 @@ { public: bad_typeid() _NOEXCEPT; + _LIBCPP_HIDE_FROM_ABI bad_typeid(const bad_typeid&) _NOEXCEPT = default; + _LIBCPP_HIDE_FROM_ABI bad_typeid& operator=(const bad_typeid&) _NOEXCEPT = default; ~bad_typeid() _NOEXCEPT override; const char* what() const _NOEXCEPT override; }; diff --git a/libcxx/test/libcxx/iterators/predef.iterators/__unconstrained_reverse_iterator/reverse.iter.elem/arrow.pass.cpp b/libcxx/test/libcxx/iterators/predef.iterators/__unconstrained_reverse_iterator/reverse.iter.elem/arrow.pass.cpp --- a/libcxx/test/libcxx/iterators/predef.iterators/__unconstrained_reverse_iterator/reverse.iter.elem/arrow.pass.cpp +++ b/libcxx/test/libcxx/iterators/predef.iterators/__unconstrained_reverse_iterator/reverse.iter.elem/arrow.pass.cpp @@ -29,6 +29,8 @@ int data_; public: A() : data_(1) {} + A(const A&) = default; + A& operator=(const A&) = default; ~A() {data_ = -1;} int get() const {return data_;} @@ -50,6 +52,8 @@ int data_; public: B(int d=1) : data_(d) {} + B(const B&) = default; + B& operator=(const B&) = default; ~B() {data_ = -1;} int get() const {return data_;} diff --git a/libcxx/test/libcxx/iterators/predef.iterators/__unconstrained_reverse_iterator/reverse.iter.elem/dereference.pass.cpp b/libcxx/test/libcxx/iterators/predef.iterators/__unconstrained_reverse_iterator/reverse.iter.elem/dereference.pass.cpp --- a/libcxx/test/libcxx/iterators/predef.iterators/__unconstrained_reverse_iterator/reverse.iter.elem/dereference.pass.cpp +++ b/libcxx/test/libcxx/iterators/predef.iterators/__unconstrained_reverse_iterator/reverse.iter.elem/dereference.pass.cpp @@ -27,6 +27,8 @@ int data_; public: A() : data_(1) {} + A(const A&) = default; + A& operator=(const A&) = default; ~A() {data_ = -1;} friend bool operator==(const A& x, const A& y) diff --git a/libcxx/test/libcxx/memory/trivial_abi/unique_ptr_array.pass.cpp b/libcxx/test/libcxx/memory/trivial_abi/unique_ptr_array.pass.cpp --- a/libcxx/test/libcxx/memory/trivial_abi/unique_ptr_array.pass.cpp +++ b/libcxx/test/libcxx/memory/trivial_abi/unique_ptr_array.pass.cpp @@ -24,6 +24,8 @@ int* shared_val; explicit Node(int* ptr) : shared_val(ptr) {} + Node(const Node&) = default; + Node& operator=(const Node&) = default; ~Node() { ++(*shared_val); } }; diff --git a/libcxx/test/libcxx/memory/trivial_abi/unique_ptr_destruction_order.pass.cpp b/libcxx/test/libcxx/memory/trivial_abi/unique_ptr_destruction_order.pass.cpp --- a/libcxx/test/libcxx/memory/trivial_abi/unique_ptr_destruction_order.pass.cpp +++ b/libcxx/test/libcxx/memory/trivial_abi/unique_ptr_destruction_order.pass.cpp @@ -26,6 +26,8 @@ explicit Base(char* buf, int* idx, char ch) : shared_buff(buf), cur_idx(idx), id(ch) {} + Base(const Base& other) = default; + Base& operator=(const Base&) = delete; ~Base() { shared_buff[(*cur_idx)++] = id; } }; diff --git a/libcxx/test/libcxx/memory/trivial_abi/unique_ptr_ret.pass.cpp b/libcxx/test/libcxx/memory/trivial_abi/unique_ptr_ret.pass.cpp --- a/libcxx/test/libcxx/memory/trivial_abi/unique_ptr_ret.pass.cpp +++ b/libcxx/test/libcxx/memory/trivial_abi/unique_ptr_ret.pass.cpp @@ -21,6 +21,8 @@ struct Node { explicit Node() {} + Node(const Node&) = default; + Node& operator=(const Node&) = default; ~Node() {} }; diff --git a/libcxx/test/libcxx/memory/trivial_abi/weak_ptr_ret.pass.cpp b/libcxx/test/libcxx/memory/trivial_abi/weak_ptr_ret.pass.cpp --- a/libcxx/test/libcxx/memory/trivial_abi/weak_ptr_ret.pass.cpp +++ b/libcxx/test/libcxx/memory/trivial_abi/weak_ptr_ret.pass.cpp @@ -21,6 +21,8 @@ struct Node { explicit Node() {} + Node(const Node&) = default; + Node& operator=(const Node&) = default; ~Node() {} }; diff --git a/libcxx/test/libcxx/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/move_reentrant.pass.cpp b/libcxx/test/libcxx/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/move_reentrant.pass.cpp --- a/libcxx/test/libcxx/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/move_reentrant.pass.cpp +++ b/libcxx/test/libcxx/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/move_reentrant.pass.cpp @@ -24,6 +24,9 @@ static std::function global; static bool cancel; + A() = default; + A(const A&) = default; + A& operator=(const A&) = default; ~A() { DoNotOptimize(cancel); if (cancel) diff --git a/libcxx/test/libcxx/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/nullptr_t_assign_reentrant.pass.cpp b/libcxx/test/libcxx/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/nullptr_t_assign_reentrant.pass.cpp --- a/libcxx/test/libcxx/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/nullptr_t_assign_reentrant.pass.cpp +++ b/libcxx/test/libcxx/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/nullptr_t_assign_reentrant.pass.cpp @@ -24,6 +24,9 @@ static std::function global; static bool cancel; + A() = default; + A(const A&) = default; + A& operator=(const A&) = default; ~A() { DoNotOptimize(cancel); if (cancel) diff --git a/libcxx/test/std/iterators/predef.iterators/insert.iterators/back.insert.iter.ops/back.insert.iter.op=/lv_value.pass.cpp b/libcxx/test/std/iterators/predef.iterators/insert.iterators/back.insert.iter.ops/back.insert.iter.op=/lv_value.pass.cpp --- a/libcxx/test/std/iterators/predef.iterators/insert.iterators/back.insert.iter.ops/back.insert.iter.op=/lv_value.pass.cpp +++ b/libcxx/test/std/iterators/predef.iterators/insert.iterators/back.insert.iter.ops/back.insert.iter.op=/lv_value.pass.cpp @@ -37,6 +37,8 @@ int data_; public: Copyable() : data_(0) {} + Copyable(const Copyable&) = default; + Copyable& operator=(const Copyable&) = default; ~Copyable() {data_ = -1;} friend bool operator==(const Copyable& x, const Copyable& y) diff --git a/libcxx/test/std/iterators/predef.iterators/insert.iterators/front.insert.iter.ops/front.insert.iter.op=/lv_value.pass.cpp b/libcxx/test/std/iterators/predef.iterators/insert.iterators/front.insert.iter.ops/front.insert.iter.op=/lv_value.pass.cpp --- a/libcxx/test/std/iterators/predef.iterators/insert.iterators/front.insert.iter.ops/front.insert.iter.op=/lv_value.pass.cpp +++ b/libcxx/test/std/iterators/predef.iterators/insert.iterators/front.insert.iter.ops/front.insert.iter.op=/lv_value.pass.cpp @@ -37,6 +37,8 @@ int data_; public: Copyable() : data_(0) {} + Copyable(const Copyable&) = default; + Copyable& operator=(const Copyable&) = default; ~Copyable() {data_ = -1;} friend bool operator==(const Copyable& x, const Copyable& y) diff --git a/libcxx/test/std/iterators/predef.iterators/move.iterators/move.iter.ops/move.iter.op.star/op_star.pass.cpp b/libcxx/test/std/iterators/predef.iterators/move.iterators/move.iter.ops/move.iter.op.star/op_star.pass.cpp --- a/libcxx/test/std/iterators/predef.iterators/move.iterators/move.iter.ops/move.iter.op.star/op_star.pass.cpp +++ b/libcxx/test/std/iterators/predef.iterators/move.iterators/move.iter.ops/move.iter.op.star/op_star.pass.cpp @@ -26,6 +26,8 @@ int data_; public: A() : data_(1) {} + A(const A&) = default; + A& operator=(const A&) = default; ~A() {data_ = -1;} friend bool operator==(const A& x, const A& y) diff --git a/libcxx/test/std/iterators/predef.iterators/reverse.iterators/reverse.iter.elem/arrow.pass.cpp b/libcxx/test/std/iterators/predef.iterators/reverse.iterators/reverse.iter.elem/arrow.pass.cpp --- a/libcxx/test/std/iterators/predef.iterators/reverse.iterators/reverse.iter.elem/arrow.pass.cpp +++ b/libcxx/test/std/iterators/predef.iterators/reverse.iterators/reverse.iter.elem/arrow.pass.cpp @@ -29,6 +29,8 @@ int data_; public: A() : data_(1) {} + A(const A&) = default; + A& operator=(const A&) = default; ~A() {data_ = -1;} int get() const {return data_;} @@ -50,6 +52,8 @@ int data_; public: B(int d=1) : data_(d) {} + B(const B&) = default; + B& operator=(const B&) = default; ~B() {data_ = -1;} int get() const {return data_;} diff --git a/libcxx/test/std/iterators/predef.iterators/reverse.iterators/reverse.iter.elem/dereference.pass.cpp b/libcxx/test/std/iterators/predef.iterators/reverse.iterators/reverse.iter.elem/dereference.pass.cpp --- a/libcxx/test/std/iterators/predef.iterators/reverse.iterators/reverse.iter.elem/dereference.pass.cpp +++ b/libcxx/test/std/iterators/predef.iterators/reverse.iterators/reverse.iter.elem/dereference.pass.cpp @@ -27,6 +27,8 @@ int data_; public: A() : data_(1) {} + A(const A&) = default; + A& operator=(const A&) = default; ~A() {data_ = -1;} friend bool operator==(const A& x, const A& y) diff --git a/libcxx/test/std/language.support/support.coroutines/end.to.end/go.pass.cpp b/libcxx/test/std/language.support/support.coroutines/end.to.end/go.pass.cpp --- a/libcxx/test/std/language.support/support.coroutines/end.to.end/go.pass.cpp +++ b/libcxx/test/std/language.support/support.coroutines/end.to.end/go.pass.cpp @@ -29,6 +29,9 @@ rh = nullptr; } + goroutine() = default; + goroutine(const goroutine&) = default; + goroutine& operator=(const goroutine&) = default; ~goroutine() {} static void run_one() diff --git a/libcxx/test/std/language.support/support.exception/except.nested/rethrow_if_nested.pass.cpp b/libcxx/test/std/language.support/support.exception/except.nested/rethrow_if_nested.pass.cpp --- a/libcxx/test/std/language.support/support.exception/except.nested/rethrow_if_nested.pass.cpp +++ b/libcxx/test/std/language.support/support.exception/except.nested/rethrow_if_nested.pass.cpp @@ -28,6 +28,8 @@ int data_; public: explicit A(int data) : data_(data) {} + A(const A&) = default; + A& operator=(const A&) = default; virtual ~A() TEST_NOEXCEPT {} friend bool operator==(const A& x, const A& y) {return x.data_ == y.data_;} diff --git a/libcxx/test/std/ranges/range.adaptors/range.drop/dangling.cache.pass.cpp b/libcxx/test/std/ranges/range.adaptors/range.drop/dangling.cache.pass.cpp --- a/libcxx/test/std/ranges/range.adaptors/range.drop/dangling.cache.pass.cpp +++ b/libcxx/test/std/ranges/range.adaptors/range.drop/dangling.cache.pass.cpp @@ -29,6 +29,9 @@ constexpr ForwardIter end() { return ForwardIter(buff + 8); } constexpr ForwardIter end() const { return ForwardIter(); } + ZeroOnDestroy() = default; + ZeroOnDestroy(const ZeroOnDestroy&) = default; + ZeroOnDestroy& operator=(const ZeroOnDestroy&) = default; ~ZeroOnDestroy() { std::memset(buff, 0, sizeof(buff)); } diff --git a/libcxx/test/std/utilities/tuple/tuple.tuple/alloc_first.h b/libcxx/test/std/utilities/tuple/tuple.tuple/alloc_first.h --- a/libcxx/test/std/utilities/tuple/tuple.tuple/alloc_first.h +++ b/libcxx/test/std/utilities/tuple/tuple.tuple/alloc_first.h @@ -44,6 +44,8 @@ allocator_constructed = true; } + alloc_first(const alloc_first&) = default; + alloc_first& operator=(const alloc_first&) = default; ~alloc_first() {data_ = -1;} friend bool operator==(const alloc_first& x, const alloc_first& y) diff --git a/libcxx/test/std/utilities/tuple/tuple.tuple/alloc_last.h b/libcxx/test/std/utilities/tuple/tuple.tuple/alloc_last.h --- a/libcxx/test/std/utilities/tuple/tuple.tuple/alloc_last.h +++ b/libcxx/test/std/utilities/tuple/tuple.tuple/alloc_last.h @@ -44,6 +44,8 @@ allocator_constructed = true; } + alloc_last(const alloc_last&) = default; + alloc_last& operator=(const alloc_last&) = default; ~alloc_last() {data_ = -1;} friend bool operator==(const alloc_last& x, const alloc_last& y) diff --git a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.assign/convert_move.pass.cpp b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.assign/convert_move.pass.cpp --- a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.assign/convert_move.pass.cpp +++ b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.assign/convert_move.pass.cpp @@ -26,6 +26,8 @@ struct B { int id_; explicit B(int i = 0) : id_(i) {} + B(const B&) = default; + B& operator=(const B&) = default; virtual ~B() {} }; diff --git a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/convert_move.pass.cpp b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/convert_move.pass.cpp --- a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/convert_move.pass.cpp +++ b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/convert_move.pass.cpp @@ -36,7 +36,8 @@ int id_; explicit B(int i) : id_(i) {} - + B(const B&) = default; + B& operator=(const B&) = default; virtual ~B() {} }; diff --git a/libcxx/test/support/counting_predicates.h b/libcxx/test/support/counting_predicates.h --- a/libcxx/test/support/counting_predicates.h +++ b/libcxx/test/support/counting_predicates.h @@ -20,6 +20,8 @@ typedef bool result_type; unary_counting_predicate(Predicate p) : p_(p), count_(0) {} + unary_counting_predicate(const unary_counting_predicate&) = default; + unary_counting_predicate& operator=(const unary_counting_predicate&) = default; ~unary_counting_predicate() {} bool operator () (const Arg &a) const { ++count_; return p_(a); } diff --git a/libcxx/test/support/deleter_types.h b/libcxx/test/support/deleter_types.h --- a/libcxx/test/support/deleter_types.h +++ b/libcxx/test/support/deleter_types.h @@ -165,6 +165,8 @@ public: TEST_CONSTEXPR_CXX23 CDeleter() : state_(0) {} TEST_CONSTEXPR_CXX23 explicit CDeleter(int s) : state_(s) {} + TEST_CONSTEXPR_CXX23 CDeleter(const CDeleter&) = default; + TEST_CONSTEXPR_CXX23 CDeleter& operator=(const CDeleter&) = default; TEST_CONSTEXPR_CXX23 ~CDeleter() { assert(state_ >= 0); state_ = -1; @@ -188,7 +190,8 @@ TEST_CONSTEXPR_CXX23 explicit CDeleter(int s) : state_(s) {} template TEST_CONSTEXPR_CXX23 CDeleter(const CDeleter& d) : state_(d.state()) {} - + TEST_CONSTEXPR_CXX23 CDeleter(const CDeleter&) = default; + TEST_CONSTEXPR_CXX23 CDeleter& operator=(const CDeleter&) = default; TEST_CONSTEXPR_CXX23 ~CDeleter() { assert(state_ >= 0); state_ = -1; diff --git a/libcxx/test/support/nasty_containers.h b/libcxx/test/support/nasty_containers.h --- a/libcxx/test/support/nasty_containers.h +++ b/libcxx/test/support/nasty_containers.h @@ -43,6 +43,8 @@ #if TEST_STD_VER >= 11 nasty_vector(std::initializer_list il) : v_(il) {} #endif + nasty_vector(const nasty_vector&) = default; + nasty_vector& operator=(const nasty_vector&) = default; ~nasty_vector() {} template @@ -174,7 +176,8 @@ #if TEST_STD_VER >= 11 nasty_list(std::initializer_list il) : l_(il) {} #endif - + nasty_list(const nasty_list&) = default; + nasty_list& operator=(const nasty_list&) = default; ~nasty_list() {} #if TEST_STD_VER >= 11 diff --git a/libcxx/utils/libcxx/test/params.py b/libcxx/utils/libcxx/test/params.py --- a/libcxx/utils/libcxx/test/params.py +++ b/libcxx/utils/libcxx/test/params.py @@ -25,6 +25,8 @@ "-Wno-aligned-allocation-unavailable", "-Wno-atomic-alignment", "-Wno-reserved-module-identifier", + '-Wdeprecated-copy', + '-Wdeprecated-copy-dtor', # GCC warns about places where we might want to add sized allocation/deallocation # functions, but we know better what we're doing/testing in the test suite. "-Wno-sized-deallocation", diff --git a/libcxxabi/test/exception_object_alignment.2.pass.cpp b/libcxxabi/test/exception_object_alignment.2.pass.cpp --- a/libcxxabi/test/exception_object_alignment.2.pass.cpp +++ b/libcxxabi/test/exception_object_alignment.2.pass.cpp @@ -18,6 +18,8 @@ struct exception { exception() : x(0) { } + exception(const exception&) = default; + exception& operator=(const exception&) = default; virtual ~exception() { } int x; };