[libcxx-commits] [PATCH] D108940: [libc++][NFC] Rename _LIBCPP_NODISCARD_ATTRIBUTE to _LIBCPP_NODISCARD

Mark de Wever via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Tue Aug 31 09:53:38 PDT 2021


Mordante accepted this revision.
Mordante added a comment.
This revision is now accepted and ready to land.

LGTM!



================
Comment at: libcxx/include/type_traits:2343
 template <class _Tp>
-_LIBCPP_NODISCARD_ATTRIBUTE _LIBCPP_INLINE_VISIBILITY constexpr
+_LIBCPP_NODISCARD _LIBCPP_INLINE_VISIBILITY constexpr
 typename make_unsigned<_Tp>::type __to_unsigned_like(_Tp __x) noexcept {
----------------
Quuxplusone wrote:
> ldionne wrote:
> > Quuxplusone wrote:
> > > This is the single solitary use of `_LIBCPP_NODISCARD_ATTRIBUTE` in the entire library, and I think it was a mistake. Let's just make this one `_LIBCPP_NODISCARD_EXT` for consistency. Then we can (continue to) decide what to do about `_LIBCPP_NODISCARD_EXT` in future PRs.
> > Thinking about it further, I don't think we even want to make this nodiscard at all. It's an internal detail of the library anyway and I don't think anyone can mistake it for a modifying operation.
> Works for me. Ship it!
I've no strong opinion about this.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D108940



More information about the libcxx-commits mailing list