[libcxx-commits] [PATCH] D108996: [libc++] Remove workarounds for [[nodebug]] not being implemented in old Clangs

Arthur O'Dwyer via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Tue Aug 31 09:06:45 PDT 2021


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

LGTM! The commit message should mention that (it looks like) old Clang didn't support the attribute //on typedefs// but did support it elsewhere. You're basically merging `_LIBCPP_NODEBUG_TYPE` into `_LIBCPP_NODEBUG`; i.e., we still have to support compilers that don't respect it, but those that //do// respect it, respect it on typedefs as well as on [other things].



================
Comment at: libcxx/include/__functional/hash.h:853-856
+using __enable_hash_helper_imp _LIBCPP_NODEBUG  = _Type;
 
 template <class _Type, class ..._Keys>
+using __enable_hash_helper _LIBCPP_NODEBUG  = __enable_hash_helper_imp<_Type,
----------------
Nit: two spaces before `=`, for no apparent reason


================
Comment at: libcxx/include/__functional/weak_result_type.h:113-125
+    typedef _LIBCPP_NODEBUG  _Rp result_type;
 };
 
 template <class _Rp>
 struct __weak_result_type<_Rp (&)()>
 {
+    typedef _LIBCPP_NODEBUG  _Rp result_type;
----------------
Nit: two spaces before `_Rp`, for no apparent reason


================
Comment at: libcxx/include/__memory/unique_ptr.h:153-163
+  using _EnableIfDeleterConstructible _LIBCPP_NODEBUG  =
       typename enable_if<is_constructible<deleter_type, _ArgType>::value>::type;
 
   template <class _UPtr, class _Up>
-  using _EnableIfMoveConvertible _LIBCPP_NODEBUG_TYPE  = typename enable_if<
+  using _EnableIfMoveConvertible _LIBCPP_NODEBUG  = typename enable_if<
       is_convertible<typename _UPtr::pointer, pointer>::value &&
       !is_array<_Up>::value
----------------
Nit: two spaces before `=` for no apparent reason


================
Comment at: libcxx/include/__memory/unique_ptr.h:363
                              __identity<deleter_type>, _Dummy>::type>
-  using _EnableIfDeleterDefaultConstructible _LIBCPP_NODEBUG_TYPE  =
+  using _EnableIfDeleterDefaultConstructible _LIBCPP_NODEBUG  =
       typename enable_if<is_default_constructible<_Deleter>::value &&
----------------
(et seq) Nit: two spaces... you know the drill.


================
Comment at: libcxx/include/__tuple:331
 template <class _Tp, class _RawTp = typename remove_reference<_Tp>::type>
-using __apply_cv_t _LIBCPP_NODEBUG_TYPE  = __apply_cv_mf<
+using __apply_cv_t _LIBCPP_NODEBUG  = __apply_cv_mf<
     is_lvalue_reference<_Tp>::value,
----------------
two spaces


================
Comment at: libcxx/include/__tuple:462
 template <size_t _Ip, class ..._Tp>
-using tuple_element_t _LIBCPP_NODEBUG_TYPE  = typename tuple_element <_Ip, _Tp...>::type;
+using tuple_element_t _LIBCPP_NODEBUG  = typename tuple_element <_Ip, _Tp...>::type;
 #endif
----------------
two spaces


================
Comment at: libcxx/include/__utility/integer_sequence.h:46
 
-template<typename _Tp, _Tp _Np> using __make_integer_sequence_unchecked _LIBCPP_NODEBUG_TYPE  =
+template<typename _Tp, _Tp _Np> using __make_integer_sequence_unchecked _LIBCPP_NODEBUG  =
   typename __detail::__make<_Np>::type::template __convert<integer_sequence, _Tp>;
----------------
two spaces (and line 57 also)


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D108996



More information about the libcxx-commits mailing list