[libcxx-commits] [libcxx] [libcxx] responds to Clang Tidy feedback (PR #97556)

Nikolas Klauser via libcxx-commits libcxx-commits at lists.llvm.org
Wed Jul 3 07:29:49 PDT 2024


================
@@ -42,17 +42,17 @@ class _LIBCPP_TEMPLATE_VIS __thread_id {
 
   static _LIBCPP_HIDE_FROM_ABI bool
   __lt_impl(__thread_id __x, __thread_id __y) _NOEXCEPT { // id==0 is always less than any other thread_id
-    if (__x.__id_ == 0)
-      return __y.__id_ != 0;
-    if (__y.__id_ == 0)
+    if (__x.__id_ == nullptr)
----------------
philnik777 wrote:

Looks like `__x.__id_` isn't a pointer on other platforms. I guess we just have to disable the check for this file.

https://github.com/llvm/llvm-project/pull/97556


More information about the libcxx-commits mailing list