[libcxx-commits] [PATCH] D101183: [libc++] Make sure __bit_iterator does not use deprecated SMF generation
Louis Dionne via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Fri Apr 23 10:17:54 PDT 2021
ldionne created this revision.
ldionne added reviewers: Quuxplusone, xbolva00.
Herald added a subscriber: arichardson.
ldionne requested review of this revision.
Herald added a project: libc++.
Herald added a subscriber: libcxx-commits.
Herald added a reviewer: libc++.
This allows us to turn -Wdeprecated-copy back on, which a recent Clang
commit broke when the warning became more stringent.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D101183
Files:
libcxx/include/__bit_reference
libcxx/utils/libcxx/test/params.py
Index: libcxx/utils/libcxx/test/params.py
===================================================================
--- libcxx/utils/libcxx/test/params.py
+++ libcxx/utils/libcxx/test/params.py
@@ -13,7 +13,6 @@
'-Werror',
'-Wall',
'-Wextra',
- '-Wno-deprecated-copy',
'-Wshadow',
'-Wundef',
'-Wno-unused-command-line-argument',
Index: libcxx/include/__bit_reference
===================================================================
--- libcxx/include/__bit_reference
+++ libcxx/include/__bit_reference
@@ -1132,10 +1132,13 @@
__bit_iterator(__type_for_abi_non_trivial_copy_ctor const& __it) _NOEXCEPT
: __seg_(__it.__seg_), __ctz_(__it.__ctz_) {}
- // Always declare the copy assignment operator since the implicit declaration
- // is deprecated.
_LIBCPP_INLINE_VISIBILITY
- __bit_iterator& operator=(__bit_iterator const&) = default;
+ __bit_iterator& operator=(__bit_iterator const& __it) _NOEXCEPT
+ {
+ __seg_ = __it.__seg_;
+ __ctz_ = __it.__ctz_;
+ return *this;
+ }
_LIBCPP_INLINE_VISIBILITY reference operator*() const _NOEXCEPT
{return reference(__seg_, __storage_type(1) << __ctz_);}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D101183.340100.patch
Type: text/x-patch
Size: 1184 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20210423/c257ca4f/attachment.bin>
More information about the libcxx-commits
mailing list