[Lldb-commits] [lldb] r245275 - Fix Clang-tidy misc-use-override warnings in some files in include/lldb/Core, unify closing inclusion guards

Pavel Labath via lldb-commits lldb-commits at lists.llvm.org
Tue Aug 18 01:39:10 PDT 2015


Author: labath
Date: Tue Aug 18 03:39:09 2015
New Revision: 245275

URL: http://llvm.org/viewvc/llvm-project?rev=245275&view=rev
Log:
Fix Clang-tidy misc-use-override warnings in some files in include/lldb/Core, unify closing inclusion guards

patch by Eugene Zelenko

Differential Revision: http://reviews.llvm.org/D11695

Modified:
    lldb/trunk/include/lldb/Core/ConnectionSharedMemory.h
    lldb/trunk/include/lldb/Core/DataBufferHeap.h
    lldb/trunk/include/lldb/Core/DataBufferMemoryMap.h
    lldb/trunk/include/lldb/Core/StructuredData.h
    lldb/trunk/include/lldb/Core/ValueObjectCast.h
    lldb/trunk/include/lldb/Core/ValueObjectChild.h
    lldb/trunk/include/lldb/Core/ValueObjectConstResult.h
    lldb/trunk/include/lldb/Core/ValueObjectConstResultCast.h
    lldb/trunk/include/lldb/Core/ValueObjectConstResultChild.h
    lldb/trunk/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.h

Modified: lldb/trunk/include/lldb/Core/ConnectionSharedMemory.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Core/ConnectionSharedMemory.h?rev=245275&r1=245274&r2=245275&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Core/ConnectionSharedMemory.h (original)
+++ lldb/trunk/include/lldb/Core/ConnectionSharedMemory.h Tue Aug 18 03:39:09 2015
@@ -28,33 +28,32 @@ public:
 
     ConnectionSharedMemory ();
 
-    virtual
-    ~ConnectionSharedMemory ();
+    ~ConnectionSharedMemory () override;
 
-    virtual bool
-    IsConnected () const;
+    bool
+    IsConnected () const override;
 
     virtual lldb::ConnectionStatus
     BytesAvailable (uint32_t timeout_usec, Error *error_ptr);
 
-    virtual lldb::ConnectionStatus
-    Connect (const char *s, Error *error_ptr);
+    lldb::ConnectionStatus
+    Connect (const char *s, Error *error_ptr) override;
 
-    virtual lldb::ConnectionStatus
-    Disconnect (Error *error_ptr);
+    lldb::ConnectionStatus
+    Disconnect (Error *error_ptr) override;
 
-    virtual size_t
+    size_t
     Read (void *dst, 
           size_t dst_len, 
           uint32_t timeout_usec,
           lldb::ConnectionStatus &status, 
-          Error *error_ptr);
+          Error *error_ptr) override;
 
-    virtual size_t
-    Write (const void *src, size_t src_len, lldb::ConnectionStatus &status, Error *error_ptr);
+    size_t
+    Write (const void *src, size_t src_len, lldb::ConnectionStatus &status, Error *error_ptr) override;
 
-    virtual std::string
-    GetURI();
+    std::string
+    GetURI() override;
 
     lldb::ConnectionStatus
     Open (bool create, const char *name, size_t size, Error *error_ptr);
@@ -64,10 +63,12 @@ protected:
     std::string m_name;
     int m_fd;    // One buffer that contains all we need
     DataBufferMemoryMap m_mmap;
+
 private:
+
     DISALLOW_COPY_AND_ASSIGN (ConnectionSharedMemory);
 };
 
 } // namespace lldb_private
 
-#endif  // liblldb_ConnectionSharedMemory_h_
+#endif // liblldb_ConnectionSharedMemory_h_

Modified: lldb/trunk/include/lldb/Core/DataBufferHeap.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Core/DataBufferHeap.h?rev=245275&r1=245274&r2=245275&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Core/DataBufferHeap.h (original)
+++ lldb/trunk/include/lldb/Core/DataBufferHeap.h Tue Aug 18 03:39:09 2015
@@ -9,7 +9,6 @@
 
 #ifndef liblldb_DataBufferHeap_h_
 #define liblldb_DataBufferHeap_h_
-#if defined(__cplusplus)
 
 #include <vector>
 
@@ -69,26 +68,25 @@ public:
     /// Virtual destructor since this class inherits from a pure virtual
     /// base class #DataBuffer.
     //------------------------------------------------------------------
-    virtual
-    ~DataBufferHeap();
+    ~DataBufferHeap() override;
 
     //------------------------------------------------------------------
     /// @copydoc DataBuffer::GetBytes()
     //------------------------------------------------------------------
-    virtual uint8_t *
-    GetBytes ();
+    uint8_t *
+    GetBytes () override;
 
     //------------------------------------------------------------------
     /// @copydoc DataBuffer::GetBytes() const
     //------------------------------------------------------------------
-    virtual const uint8_t *
-    GetBytes () const;
+    const uint8_t *
+    GetBytes () const override;
 
     //------------------------------------------------------------------
     /// @copydoc DataBuffer::GetByteSize() const
     //------------------------------------------------------------------
-    virtual lldb::offset_t
-    GetByteSize () const;
+    lldb::offset_t
+    GetByteSize () const override;
 
     //------------------------------------------------------------------
     /// Set the number of bytes in the data buffer.
@@ -138,5 +136,4 @@ private:
 
 } // namespace lldb_private
 
-#endif  // #if defined(__cplusplus)
-#endif  // liblldb_DataBufferHeap_h_
+#endif // liblldb_DataBufferHeap_h_

Modified: lldb/trunk/include/lldb/Core/DataBufferMemoryMap.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Core/DataBufferMemoryMap.h?rev=245275&r1=245274&r2=245275&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Core/DataBufferMemoryMap.h (original)
+++ lldb/trunk/include/lldb/Core/DataBufferMemoryMap.h Tue Aug 18 03:39:09 2015
@@ -9,8 +9,6 @@
 
 #ifndef liblldb_DataBufferMemoryMap_h_
 #define liblldb_DataBufferMemoryMap_h_
-#if defined(__cplusplus)
-
 
 #include "lldb/lldb-private.h"
 #include "lldb/Core/DataBuffer.h"
@@ -45,8 +43,7 @@ public:
     /// Virtual destructor since this class inherits from a pure virtual
     /// base class #DataBuffer.
     //------------------------------------------------------------------
-    virtual
-    ~DataBufferMemoryMap ();
+    ~DataBufferMemoryMap () override;
 
     //------------------------------------------------------------------
     /// Reverts this object to an empty state by unmapping any memory
@@ -58,20 +55,20 @@ public:
     //------------------------------------------------------------------
     /// @copydoc DataBuffer::GetBytes()
     //------------------------------------------------------------------
-    virtual uint8_t *
-    GetBytes ();
+    uint8_t *
+    GetBytes () override;
 
     //------------------------------------------------------------------
     /// @copydoc DataBuffer::GetBytes() const
     //------------------------------------------------------------------
-    virtual const uint8_t *
-    GetBytes () const;
+    const uint8_t *
+    GetBytes () const override;
 
     //------------------------------------------------------------------
     /// @copydoc DataBuffer::GetByteSize() const
     //------------------------------------------------------------------
-    virtual lldb::offset_t
-    GetByteSize () const;
+    lldb::offset_t
+    GetByteSize () const override;
 
     //------------------------------------------------------------------
     /// Error get accessor.
@@ -161,5 +158,4 @@ private:
 
 } // namespace lldb_private
 
-#endif  // #if defined(__cplusplus)
-#endif  // liblldb_DataBufferMemoryMap_h_
+#endif // liblldb_DataBufferMemoryMap_h_

Modified: lldb/trunk/include/lldb/Core/StructuredData.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Core/StructuredData.h?rev=245275&r1=245274&r2=245275&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Core/StructuredData.h (original)
+++ lldb/trunk/include/lldb/Core/StructuredData.h Tue Aug 18 03:39:09 2015
@@ -233,8 +233,7 @@ public:
         {
         }
 
-        virtual
-        ~Array()
+        ~Array() override
         {
         }
 
@@ -249,7 +248,6 @@ public:
             return true;
         }
 
-
         size_t
         GetSize() const
         {
@@ -375,8 +373,7 @@ public:
         collection m_items;
     };
 
-
-    class Integer  : public Object
+    class Integer : public Object
     {
     public:
         Integer (uint64_t i = 0) :
@@ -385,7 +382,7 @@ public:
         {
         }
 
-        virtual ~Integer()
+        ~Integer() override
         {
         }
 
@@ -407,7 +404,7 @@ public:
         uint64_t m_value;
     };
 
-    class Float  : public Object
+    class Float : public Object
     {
     public:
         Float (double d = 0.0) :
@@ -416,7 +413,7 @@ public:
         {
         }
 
-        virtual ~Float()
+        ~Float() override
         {
         }
 
@@ -438,7 +435,7 @@ public:
         double m_value;
     };
 
-    class Boolean  : public Object
+    class Boolean : public Object
     {
     public:
         Boolean (bool b = false) :
@@ -447,7 +444,7 @@ public:
         {
         }
 
-        virtual ~Boolean()
+        ~Boolean() override
         {
         }
 
@@ -469,9 +466,7 @@ public:
         bool m_value;
     };
 
-
-
-    class String  : public Object
+    class String : public Object
     {
     public:
         String (const char *cstr = NULL) :
@@ -522,7 +517,7 @@ public:
         {
         }
 
-        virtual ~Dictionary()
+        ~Dictionary() override
         {
         }
 
@@ -728,7 +723,7 @@ public:
         {
         }
 
-        virtual ~Null()
+        ~Null() override
         {
         }
 
@@ -778,10 +773,8 @@ public:
 
     static ObjectSP
     ParseJSON (std::string json_text);
-
 };  // class StructuredData
 
-
 } // namespace lldb_private
 
-#endif  // liblldb_StructuredData_h_
+#endif // liblldb_StructuredData_h_

Modified: lldb/trunk/include/lldb/Core/ValueObjectCast.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Core/ValueObjectCast.h?rev=245275&r1=245274&r2=245275&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Core/ValueObjectCast.h (original)
+++ lldb/trunk/include/lldb/Core/ValueObjectCast.h Tue Aug 18 03:39:09 2015
@@ -29,23 +29,22 @@ public:
             const ConstString &name, 
             const CompilerType &cast_type);
 
-    virtual
-    ~ValueObjectCast();
+    ~ValueObjectCast() override;
     
-    virtual uint64_t
-    GetByteSize();
+    uint64_t
+    GetByteSize() override;
     
-    virtual size_t
-    CalculateNumChildren();
+    size_t
+    CalculateNumChildren() override;
     
-    virtual lldb::ValueType
-    GetValueType() const;
+    lldb::ValueType
+    GetValueType() const override;
     
-    virtual bool
-    IsInScope ();
+    bool
+    IsInScope() override;
     
-    virtual ValueObject *
-    GetParent()
+    ValueObject *
+    GetParent() override
     {
         if (m_parent)
             return m_parent->GetParent();
@@ -53,8 +52,8 @@ public:
             return NULL;
     }
     
-    virtual const ValueObject *
-    GetParent() const
+    const ValueObject *
+    GetParent() const override
     {
         if (m_parent)
             return m_parent->GetParent();
@@ -84,4 +83,4 @@ private:
 
 } // namespace lldb_private
 
-#endif  // liblldb_ValueObjectCast_h_
+#endif // liblldb_ValueObjectCast_h_

Modified: lldb/trunk/include/lldb/Core/ValueObjectChild.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Core/ValueObjectChild.h?rev=245275&r1=245274&r2=245275&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Core/ValueObjectChild.h (original)
+++ lldb/trunk/include/lldb/Core/ValueObjectChild.h Tue Aug 18 03:39:09 2015
@@ -129,4 +129,4 @@ protected:
 
 } // namespace lldb_private
 
-#endif  // liblldb_ValueObjectChild_h_
+#endif // liblldb_ValueObjectChild_h_

Modified: lldb/trunk/include/lldb/Core/ValueObjectConstResult.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Core/ValueObjectConstResult.h?rev=245275&r1=245274&r2=245275&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Core/ValueObjectConstResult.h (original)
+++ lldb/trunk/include/lldb/Core/ValueObjectConstResult.h Tue Aug 18 03:39:09 2015
@@ -187,4 +187,4 @@ private:
 
 } // namespace lldb_private
 
-#endif  // liblldb_ValueObjectConstResult_h_
+#endif // liblldb_ValueObjectConstResult_h_

Modified: lldb/trunk/include/lldb/Core/ValueObjectConstResultCast.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Core/ValueObjectConstResultCast.h?rev=245275&r1=245274&r2=245275&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Core/ValueObjectConstResultCast.h (original)
+++ lldb/trunk/include/lldb/Core/ValueObjectConstResultCast.h Tue Aug 18 03:39:09 2015
@@ -28,16 +28,15 @@ public:
         const CompilerType &cast_type,
         lldb::addr_t live_address = LLDB_INVALID_ADDRESS);
 
-    virtual
-    ~ValueObjectConstResultCast ();
+    ~ValueObjectConstResultCast() override;
 
-    virtual lldb::ValueObjectSP
-    Dereference (Error &error);
+    lldb::ValueObjectSP
+    Dereference(Error &error) override;
 
-    virtual ValueObject *
-    CreateChildAtIndex (size_t idx,
-                        bool synthetic_array_member,
-                        int32_t synthetic_index);
+    ValueObject *
+    CreateChildAtIndex(size_t idx,
+		       bool synthetic_array_member,
+		       int32_t synthetic_index) override;
 
     virtual CompilerType
     GetClangType ()

Modified: lldb/trunk/include/lldb/Core/ValueObjectConstResultChild.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Core/ValueObjectConstResultChild.h?rev=245275&r1=245274&r2=245275&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Core/ValueObjectConstResultChild.h (original)
+++ lldb/trunk/include/lldb/Core/ValueObjectConstResultChild.h Tue Aug 18 03:39:09 2015
@@ -37,13 +37,13 @@ public:
                                  bool is_deref_of_parent,
                                  lldb::addr_t live_address = LLDB_INVALID_ADDRESS);
     
-    virtual ~ValueObjectConstResultChild();
+    ~ValueObjectConstResultChild() override;
     
-    virtual lldb::ValueObjectSP
-    Dereference (Error &error);
+    lldb::ValueObjectSP
+    Dereference(Error &error) override;
     
-    virtual ValueObject *
-    CreateChildAtIndex (size_t idx, bool synthetic_array_member, int32_t synthetic_index);
+    ValueObject *
+    CreateChildAtIndex(size_t idx, bool synthetic_array_member, int32_t synthetic_index) override;
 
     virtual CompilerType
     GetClangType ()
@@ -78,4 +78,4 @@ private:
 
 } // namespace lldb_private
 
-#endif  // liblldb_ValueObjectConstResultChild_h_
+#endif // liblldb_ValueObjectConstResultChild_h_

Modified: lldb/trunk/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.h?rev=245275&r1=245274&r2=245275&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.h (original)
+++ lldb/trunk/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.h Tue Aug 18 03:39:09 2015
@@ -128,7 +128,7 @@ public:
 
     ScriptInterpreterPython (CommandInterpreter &interpreter);
 
-    ~ScriptInterpreterPython ();
+    ~ScriptInterpreterPython() override;
 
     bool
     Interrupt() override;
@@ -495,7 +495,7 @@ public:
                 FILE *out = NULL,
                 FILE *err = NULL);
         
-    	~Locker ();
+        ~Locker () override;
 
 	private:
         
@@ -585,6 +585,6 @@ protected:
 };
 } // namespace lldb_private
 
-#endif // #ifdef LLDB_DISABLE_PYTHON
+#endif // LLDB_DISABLE_PYTHON
 
-#endif // #ifndef LLDB_PLUGINS_SCRIPTINTERPRETER_PYTHON_SCRIPTINTERPRETERPYTHON_H
+#endif // LLDB_PLUGINS_SCRIPTINTERPRETER_PYTHON_SCRIPTINTERPRETERPYTHON_H




More information about the lldb-commits mailing list