[Lldb-commits] [lldb] r360751 - Mark private unimplemented functions as deleted

Jonas Devlieghere via lldb-commits lldb-commits at lists.llvm.org
Tue May 14 22:31:14 PDT 2019


Author: jdevlieghere
Date: Tue May 14 22:31:14 2019
New Revision: 360751

URL: http://llvm.org/viewvc/llvm-project?rev=360751&view=rev
Log:
Mark private unimplemented functions as deleted

Applies modernize-use-equals-delete to the LLDB code base and removes
the now redundant comments.

Modified:
    lldb/trunk/include/lldb/Breakpoint/StoppointLocation.h
    lldb/trunk/include/lldb/Host/macosx/HostInfoMacOSX.h
    lldb/trunk/include/lldb/Symbol/Variable.h
    lldb/trunk/include/lldb/Target/QueueList.h
    lldb/trunk/include/lldb/Target/ThreadList.h
    lldb/trunk/include/lldb/Target/UnwindAssembly.h
    lldb/trunk/include/lldb/Utility/Event.h
    lldb/trunk/include/lldb/Utility/SharingPtr.h
    lldb/trunk/source/Host/macosx/cfcpp/CFCBundle.h
    lldb/trunk/tools/debugserver/source/MacOSX/MachTask.h
    lldb/trunk/tools/debugserver/source/PThreadEvent.h
    lldb/trunk/tools/debugserver/source/PseudoTerminal.h
    lldb/trunk/tools/debugserver/source/RNBContext.h
    lldb/trunk/tools/debugserver/source/RNBRemote.h
    lldb/trunk/tools/debugserver/source/RNBSocket.h

Modified: lldb/trunk/include/lldb/Breakpoint/StoppointLocation.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Breakpoint/StoppointLocation.h?rev=360751&r1=360750&r2=360751&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Breakpoint/StoppointLocation.h (original)
+++ lldb/trunk/include/lldb/Breakpoint/StoppointLocation.h Tue May 14 22:31:14 2019
@@ -78,7 +78,7 @@ protected:
 private:
   // For StoppointLocation only
   DISALLOW_COPY_AND_ASSIGN(StoppointLocation);
-  StoppointLocation(); // Disallow default constructor
+  StoppointLocation() = delete;
 };
 
 } // namespace lldb_private

Modified: lldb/trunk/include/lldb/Host/macosx/HostInfoMacOSX.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Host/macosx/HostInfoMacOSX.h?rev=360751&r1=360750&r2=360751&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Host/macosx/HostInfoMacOSX.h (original)
+++ lldb/trunk/include/lldb/Host/macosx/HostInfoMacOSX.h Tue May 14 22:31:14 2019
@@ -22,8 +22,8 @@ class HostInfoMacOSX : public HostInfoPo
 
 private:
   // Static class, unconstructable.
-  HostInfoMacOSX();
-  ~HostInfoMacOSX();
+  HostInfoMacOSX() = delete;
+  ~HostInfoMacOSX() = delete;
 
 public:
   static llvm::VersionTuple GetOSVersion();

Modified: lldb/trunk/include/lldb/Symbol/Variable.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Symbol/Variable.h?rev=360751&r1=360750&r2=360751&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Symbol/Variable.h (original)
+++ lldb/trunk/include/lldb/Symbol/Variable.h Tue May 14 22:31:14 2019
@@ -128,8 +128,8 @@ protected:
       m_static_member : 1; // Non-zero if variable is static member of a class
                            // or struct.
 private:
-  Variable(const Variable &rhs);
-  Variable &operator=(const Variable &rhs);
+  Variable(const Variable &rhs) = delete;
+  Variable &operator=(const Variable &rhs) = delete;
 };
 
 } // namespace lldb_private

Modified: lldb/trunk/include/lldb/Target/QueueList.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Target/QueueList.h?rev=360751&r1=360750&r2=360751&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Target/QueueList.h (original)
+++ lldb/trunk/include/lldb/Target/QueueList.h Tue May 14 22:31:14 2019
@@ -102,7 +102,7 @@ protected:
   std::mutex m_mutex;
 
 private:
-  QueueList();
+  QueueList() = delete;
 };
 
 } // namespace lldb_private

Modified: lldb/trunk/include/lldb/Target/ThreadList.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Target/ThreadList.h?rev=360751&r1=360750&r2=360751&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Target/ThreadList.h (original)
+++ lldb/trunk/include/lldb/Target/ThreadList.h Tue May 14 22:31:14 2019
@@ -151,7 +151,7 @@ protected:
   std::vector<lldb::tid_t> m_expression_tid_stack;
 
 private:
-  ThreadList();
+  ThreadList() = delete;
 };
 
 } // namespace lldb_private

Modified: lldb/trunk/include/lldb/Target/UnwindAssembly.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Target/UnwindAssembly.h?rev=360751&r1=360750&r2=360751&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Target/UnwindAssembly.h (original)
+++ lldb/trunk/include/lldb/Target/UnwindAssembly.h Tue May 14 22:31:14 2019
@@ -44,7 +44,7 @@ protected:
   ArchSpec m_arch;
 
 private:
-  UnwindAssembly(); // Outlaw default constructor
+  UnwindAssembly() = delete;
   DISALLOW_COPY_AND_ASSIGN(UnwindAssembly);
 };
 

Modified: lldb/trunk/include/lldb/Utility/Event.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Utility/Event.h?rev=360751&r1=360750&r2=360751&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Utility/Event.h (original)
+++ lldb/trunk/include/lldb/Utility/Event.h Tue May 14 22:31:14 2019
@@ -245,7 +245,7 @@ private:
   lldb::EventDataSP m_data_sp; // User specific data for this event
 
   DISALLOW_COPY_AND_ASSIGN(Event);
-  Event(); // Disallow default constructor
+  Event() = delete;
 };
 
 } // namespace lldb_private

Modified: lldb/trunk/include/lldb/Utility/SharingPtr.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Utility/SharingPtr.h?rev=360751&r1=360750&r2=360751&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Utility/SharingPtr.h (original)
+++ lldb/trunk/include/lldb/Utility/SharingPtr.h Tue May 14 22:31:14 2019
@@ -35,8 +35,8 @@ namespace lldb_private {
 namespace imp {
 
 class shared_count {
-  shared_count(const shared_count &);
-  shared_count &operator=(const shared_count &);
+  shared_count(const shared_count &) = delete;
+  shared_count &operator=(const shared_count &) = delete;
 
 public:
   explicit shared_count(long refs = 0) : shared_owners_(refs) {}
@@ -66,10 +66,8 @@ public:
 private:
   void on_zero_shared() override;
 
-  // Outlaw copy constructor and assignment operator to keep effective C++
-  // warnings down to a minimum
-  shared_ptr_pointer(const shared_ptr_pointer &);
-  shared_ptr_pointer &operator=(const shared_ptr_pointer &);
+  shared_ptr_pointer(const shared_ptr_pointer &) = delete;
+  shared_ptr_pointer &operator=(const shared_ptr_pointer &) = delete;
 };
 
 template <class T> void shared_ptr_pointer<T>::on_zero_shared() {
@@ -455,8 +453,8 @@ protected:
   friend class IntrusiveSharingPtr<T>;
 
 private:
-  ReferenceCountedBase(const ReferenceCountedBase &);
-  ReferenceCountedBase &operator=(const ReferenceCountedBase &);
+  ReferenceCountedBase(const ReferenceCountedBase &) = delete;
+  ReferenceCountedBase &operator=(const ReferenceCountedBase &) = delete;
 };
 
 template <class T> void lldb_private::ReferenceCountedBase<T>::add_shared() {

Modified: lldb/trunk/source/Host/macosx/cfcpp/CFCBundle.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Host/macosx/cfcpp/CFCBundle.h?rev=360751&r1=360750&r2=360751&view=diff
==============================================================================
--- lldb/trunk/source/Host/macosx/cfcpp/CFCBundle.h (original)
+++ lldb/trunk/source/Host/macosx/cfcpp/CFCBundle.h Tue May 14 22:31:14 2019
@@ -31,9 +31,9 @@ public:
 
 private:
   // Disallow copy and assignment constructors
-  CFCBundle(const CFCBundle &);
+  CFCBundle(const CFCBundle &) = delete;
 
-  const CFCBundle &operator=(const CFCBundle &);
+  const CFCBundle &operator=(const CFCBundle &) = delete;
 };
 
 #endif // #ifndef CoreFoundationCPP_CFBundle_h_

Modified: lldb/trunk/tools/debugserver/source/MacOSX/MachTask.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/debugserver/source/MacOSX/MachTask.h?rev=360751&r1=360750&r2=360751&view=diff
==============================================================================
--- lldb/trunk/tools/debugserver/source/MacOSX/MachTask.h (original)
+++ lldb/trunk/tools/debugserver/source/MacOSX/MachTask.h Tue May 14 22:31:14 2019
@@ -102,8 +102,8 @@ protected:
   allocation_collection m_allocations;
 
 private:
-  MachTask(const MachTask &);               // Outlaw
-  MachTask &operator=(const MachTask &rhs); // Outlaw
+  MachTask(const MachTask &) = delete;
+  MachTask &operator=(const MachTask &rhs) = delete;
 };
 
 #endif // __MachTask_h__

Modified: lldb/trunk/tools/debugserver/source/PThreadEvent.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/debugserver/source/PThreadEvent.h?rev=360751&r1=360750&r2=360751&view=diff
==============================================================================
--- lldb/trunk/tools/debugserver/source/PThreadEvent.h (original)
+++ lldb/trunk/tools/debugserver/source/PThreadEvent.h Tue May 14 22:31:14 2019
@@ -54,8 +54,8 @@ protected:
   uint32_t m_reset_ack_mask;
 
 private:
-  PThreadEvent(const PThreadEvent &); // Outlaw copy constructor
-  PThreadEvent &operator=(const PThreadEvent &rhs);
+  PThreadEvent(const PThreadEvent &) = delete;
+  PThreadEvent &operator=(const PThreadEvent &rhs) = delete;
 };
 
 #endif // #ifndef __PThreadEvent_h__

Modified: lldb/trunk/tools/debugserver/source/PseudoTerminal.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/debugserver/source/PseudoTerminal.h?rev=360751&r1=360750&r2=360751&view=diff
==============================================================================
--- lldb/trunk/tools/debugserver/source/PseudoTerminal.h (original)
+++ lldb/trunk/tools/debugserver/source/PseudoTerminal.h Tue May 14 22:31:14 2019
@@ -72,9 +72,8 @@ protected:
   int m_slave_fd;
 
 private:
-  // Outlaw copy and assignment constructors
-  PseudoTerminal(const PseudoTerminal &rhs);
-  PseudoTerminal &operator=(const PseudoTerminal &rhs);
+  PseudoTerminal(const PseudoTerminal &rhs) = delete;
+  PseudoTerminal &operator=(const PseudoTerminal &rhs) = delete;
 };
 
 #endif // #ifndef __PseudoTerminal_h__

Modified: lldb/trunk/tools/debugserver/source/RNBContext.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/debugserver/source/RNBContext.h?rev=360751&r1=360750&r2=360751&view=diff
==============================================================================
--- lldb/trunk/tools/debugserver/source/RNBContext.h (original)
+++ lldb/trunk/tools/debugserver/source/RNBContext.h Tue May 14 22:31:14 2019
@@ -149,9 +149,8 @@ protected:
   static void *ThreadFunctionProcessStatus(void *arg);
 
 private:
-  // Outlaw copy and assignment operators
-  RNBContext(const RNBContext &rhs);
-  RNBContext &operator=(const RNBContext &rhs);
+  RNBContext(const RNBContext &rhs) = delete;
+  RNBContext &operator=(const RNBContext &rhs) = delete;
 };
 
 #endif // #ifndef __RNBContext_h__

Modified: lldb/trunk/tools/debugserver/source/RNBRemote.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/debugserver/source/RNBRemote.h?rev=360751&r1=360750&r2=360751&view=diff
==============================================================================
--- lldb/trunk/tools/debugserver/source/RNBRemote.h (original)
+++ lldb/trunk/tools/debugserver/source/RNBRemote.h Tue May 14 22:31:14 2019
@@ -264,8 +264,7 @@ public:
   RNBSocket &Comm() { return m_comm; }
 
 private:
-  // Outlaw some constructors
-  RNBRemote(const RNBRemote &);
+  RNBRemote(const RNBRemote &) = delete;
 
 protected:
   rnb_err_t GetCommData();

Modified: lldb/trunk/tools/debugserver/source/RNBSocket.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/debugserver/source/RNBSocket.h?rev=360751&r1=360750&r2=360751&view=diff
==============================================================================
--- lldb/trunk/tools/debugserver/source/RNBSocket.h (original)
+++ lldb/trunk/tools/debugserver/source/RNBSocket.h Tue May 14 22:31:14 2019
@@ -59,8 +59,7 @@ public:
                              int option_value);
 
 private:
-  // Outlaw some constructors
-  RNBSocket(const RNBSocket &);
+  RNBSocket(const RNBSocket &) = delete;
 
 protected:
   rnb_err_t ClosePort(int &fd, bool save_errno);




More information about the lldb-commits mailing list