[Lldb-commits] [lldb] 8b649f9 - [lldb] Add NOLINT(modernize-use-nullptr)

Kazu Hirata via lldb-commits lldb-commits at lists.llvm.org
Sat Jan 1 13:15:10 PST 2022


Author: Kazu Hirata
Date: 2022-01-01T13:14:59-08:00
New Revision: 8b649f98f68c5fe6e39f0d3666bb2dfef4543beb

URL: https://github.com/llvm/llvm-project/commit/8b649f98f68c5fe6e39f0d3666bb2dfef4543beb
DIFF: https://github.com/llvm/llvm-project/commit/8b649f98f68c5fe6e39f0d3666bb2dfef4543beb.diff

LOG: [lldb] Add NOLINT(modernize-use-nullptr)

thread_result_t is defined as unsigned on Windows.

This patch prevents clang-tidy from replacing 0 with nullptr.

Added: 
    

Modified: 
    lldb/include/lldb/Host/HostNativeThreadBase.h
    lldb/source/Host/common/HostNativeThreadBase.cpp

Removed: 
    


################################################################################
diff  --git a/lldb/include/lldb/Host/HostNativeThreadBase.h b/lldb/include/lldb/Host/HostNativeThreadBase.h
index bfd70d745593e..1c581c279e1e7 100644
--- a/lldb/include/lldb/Host/HostNativeThreadBase.h
+++ b/lldb/include/lldb/Host/HostNativeThreadBase.h
@@ -46,7 +46,7 @@ class HostNativeThreadBase {
   ThreadCreateTrampoline(lldb::thread_arg_t arg);
 
   lldb::thread_t m_thread = LLDB_INVALID_HOST_THREAD;
-  lldb::thread_result_t m_result = 0;
+  lldb::thread_result_t m_result = 0; // NOLINT(modernize-use-nullptr)
 };
 }
 

diff  --git a/lldb/source/Host/common/HostNativeThreadBase.cpp b/lldb/source/Host/common/HostNativeThreadBase.cpp
index b15160b143ca7..b8223e3ec42af 100644
--- a/lldb/source/Host/common/HostNativeThreadBase.cpp
+++ b/lldb/source/Host/common/HostNativeThreadBase.cpp
@@ -18,7 +18,7 @@ using namespace lldb;
 using namespace lldb_private;
 
 HostNativeThreadBase::HostNativeThreadBase(thread_t thread)
-    : m_thread(thread), m_result(0) {}
+    : m_thread(thread), m_result(0) {} // NOLINT(modernize-use-nullptr)
 
 lldb::thread_t HostNativeThreadBase::GetSystemHandle() const {
   return m_thread;
@@ -34,7 +34,7 @@ bool HostNativeThreadBase::IsJoinable() const {
 
 void HostNativeThreadBase::Reset() {
   m_thread = LLDB_INVALID_HOST_THREAD;
-  m_result = 0;
+  m_result = 0; // NOLINT(modernize-use-nullptr)
 }
 
 bool HostNativeThreadBase::EqualsThread(lldb::thread_t thread) const {
@@ -44,7 +44,7 @@ bool HostNativeThreadBase::EqualsThread(lldb::thread_t thread) const {
 lldb::thread_t HostNativeThreadBase::Release() {
   lldb::thread_t result = m_thread;
   m_thread = LLDB_INVALID_HOST_THREAD;
-  m_result = 0;
+  m_result = 0; // NOLINT(modernize-use-nullptr)
 
   return result;
 }


        


More information about the lldb-commits mailing list