[libcxx-commits] [PATCH] D108940: [libc++][NFC] Rename _LIBCPP_NODISCARD_ATTRIBUTE to _LIBCPP_NODISCARD
Arthur O'Dwyer via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Tue Aug 31 09:07:26 PDT 2021
Quuxplusone accepted this revision as: Quuxplusone.
Quuxplusone added inline comments.
================
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 {
----------------
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!
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