Mark private unimplemented functions as deleted
authorJonas Devlieghere <jonas@devlieghere.com>
Wed, 15 May 2019 05:31:14 +0000 (05:31 +0000)
committerJonas Devlieghere <jonas@devlieghere.com>
Wed, 15 May 2019 05:31:14 +0000 (05:31 +0000)
Applies modernize-use-equals-delete to the LLDB code base and removes
the now redundant comments.

llvm-svn: 360751

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

index 906cef54eee2fad1be78b844fe6abada7d1af166..3926f452e564c9c6fe21c72be31d974b8e0cd1a7 100644 (file)
@@ -78,7 +78,7 @@ protected:
 private:
   // For StoppointLocation only
   DISALLOW_COPY_AND_ASSIGN(StoppointLocation);
-  StoppointLocation(); // Disallow default constructor
+  StoppointLocation() = delete;
 };
 
 } // namespace lldb_private
index d591776f4af3d2c83d5675907efa076c150667b6..d49e27a8ee5290102e29edc057fe3730c4c5d368 100644 (file)
@@ -22,8 +22,8 @@ class HostInfoMacOSX : public HostInfoPosix {
 
 private:
   // Static class, unconstructable.
-  HostInfoMacOSX();
-  ~HostInfoMacOSX();
+  HostInfoMacOSX() = delete;
+  ~HostInfoMacOSX() = delete;
 
 public:
   static llvm::VersionTuple GetOSVersion();
index ea46df703fbb110955ed8bde06d28240a8159878..12daecfc04e63ed8f21cb8a3cb5e596a1d252406 100644 (file)
@@ -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
index 7029fa28f6e070f258c888bf6030a5cecb5784ce..761107e41def6f03164c294f08882e71fb0affac 100644 (file)
@@ -102,7 +102,7 @@ protected:
   std::mutex m_mutex;
 
 private:
-  QueueList();
+  QueueList() = delete;
 };
 
 } // namespace lldb_private
index dcbd9aa8356d1516c8e23781ab78406d2defe763..64ddf5aea504aa3ebbbb274dae5cc299039f6647 100644 (file)
@@ -151,7 +151,7 @@ protected:
   std::vector<lldb::tid_t> m_expression_tid_stack;
 
 private:
-  ThreadList();
+  ThreadList() = delete;
 };
 
 } // namespace lldb_private
index 7c42df2d6afda9dffa92f7b986c92a3a4f734e31..a70aef6e93c52cdcf4b17576b7f7fdf553e9fa3d 100644 (file)
@@ -44,7 +44,7 @@ protected:
   ArchSpec m_arch;
 
 private:
-  UnwindAssembly(); // Outlaw default constructor
+  UnwindAssembly() = delete;
   DISALLOW_COPY_AND_ASSIGN(UnwindAssembly);
 };
 
index c0e4e972febbe51e02df91c887903283dcc86d45..3743c6473791106cc4ee10db439d8eefc264d1a5 100644 (file)
@@ -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
index 5515103e6ce32826b6c06cae920771b964ad01d0..e4ab3d27a69b77f43b525b5fe54ce7a1b8d0c3cd 100644 (file)
@@ -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() {
index 9ff58fba854d730945a312c62cb99dd8c43aee01..014552ab18ff67dcb3c33bbe568e648749a68654 100644 (file)
@@ -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_
index a933bffc8a0ef79e9293ec997637114d92a9abca..c975e15a55518f15e9abecffdc696af6581d34cf 100644 (file)
@@ -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__
index 5689cbfb9caeffc7e99246a4e13db6d27dd231b6..f81798de5c7887d882148df3d82360363d35dbc0 100644 (file)
@@ -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__
index e4093bd98e9490c7df7fa6907136e0db84d6cee8..e3324c1c358121ea36f41781a2c6b3889a1d634d 100644 (file)
@@ -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__
index 9159057329fb21ecf9dcc4b2a6a4c5eb9fa40ec0..946dfb2eb10185d8cfb72c3e7f808b27799987d6 100644 (file)
@@ -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__
index 1fb309bbc44a09f4c91da990f28668bf0065abae..88d82091130862bf7fe5d04dfef23e33224b4f54 100644 (file)
@@ -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();
index da6c6d888748948b17659fd21be6be06bc78ad68..2f68eb00f3763e3dc17057e94213b934d218b8a9 100644 (file)
@@ -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);