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

Pavel Labath labath at google.com
Fri Jul 31 01:17:10 PDT 2015


Author: labath
Date: Fri Jul 31 03:17:10 2015
New Revision: 243738

URL: http://llvm.org/viewvc/llvm-project?rev=243738&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/D11669

Modified:
    lldb/trunk/include/lldb/Core/AddressResolver.h
    lldb/trunk/include/lldb/Core/AddressResolverFileLine.h
    lldb/trunk/include/lldb/Core/AddressResolverName.h
    lldb/trunk/include/lldb/Core/Event.h
    lldb/trunk/include/lldb/Core/FileLineResolver.h
    lldb/trunk/include/lldb/Core/History.h
    lldb/trunk/include/lldb/Core/StreamAsynchronousIO.h
    lldb/trunk/include/lldb/Core/StreamCallback.h
    lldb/trunk/include/lldb/Core/StreamFile.h
    lldb/trunk/include/lldb/Core/StreamString.h
    lldb/trunk/include/lldb/Core/StreamTee.h

Modified: lldb/trunk/include/lldb/Core/AddressResolver.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Core/AddressResolver.h?rev=243738&r1=243737&r2=243738&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Core/AddressResolver.h (original)
+++ lldb/trunk/include/lldb/Core/AddressResolver.h Fri Jul 31 03:17:10 2015
@@ -54,8 +54,7 @@ public:
 
     AddressResolver ();
 
-    virtual
-    ~AddressResolver ();
+    ~AddressResolver () override;
 
     virtual void
     ResolveAddress (SearchFilter &filter);
@@ -64,8 +63,8 @@ public:
     ResolveAddressInModules (SearchFilter &filter,
                              ModuleList &modules);
 
-    virtual void
-    GetDescription (Stream *s) = 0;
+    void
+    GetDescription (Stream *s) override = 0;
 
     std::vector<AddressRange> &
     GetAddressRanges ();
@@ -86,4 +85,4 @@ private:
 
 } // namespace lldb_private
 
-#endif  // liblldb_AddressResolver_h_
+#endif // liblldb_AddressResolver_h_

Modified: lldb/trunk/include/lldb/Core/AddressResolverFileLine.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Core/AddressResolverFileLine.h?rev=243738&r1=243737&r2=243738&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Core/AddressResolverFileLine.h (original)
+++ lldb/trunk/include/lldb/Core/AddressResolverFileLine.h Fri Jul 31 03:17:10 2015
@@ -30,20 +30,19 @@ public:
                              uint32_t line_no,
                              bool check_inlines);
 
-    virtual
-    ~AddressResolverFileLine ();
+    ~AddressResolverFileLine () override;
 
-    virtual Searcher::CallbackReturn
+    Searcher::CallbackReturn
     SearchCallback (SearchFilter &filter,
                     SymbolContext &context,
                     Address *addr,
-                    bool containing);
+                    bool containing) override;
 
-    virtual Searcher::Depth
-    GetDepth ();
+    Searcher::Depth
+    GetDepth () override;
 
-    virtual void
-    GetDescription (Stream *s);
+    void
+    GetDescription (Stream *s) override;
 
 protected:
     FileSpec m_file_spec; // This is the file spec we are looking for.
@@ -56,4 +55,4 @@ private:
 
 } // namespace lldb_private
 
-#endif  // liblldb_AddressResolverFileLine_h_
+#endif // liblldb_AddressResolverFileLine_h_

Modified: lldb/trunk/include/lldb/Core/AddressResolverName.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Core/AddressResolverName.h?rev=243738&r1=243737&r2=243738&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Core/AddressResolverName.h (original)
+++ lldb/trunk/include/lldb/Core/AddressResolverName.h Fri Jul 31 03:17:10 2015
@@ -38,20 +38,19 @@ public:
                          const char *method,
                          AddressResolver::MatchType type);
 
-    virtual
-    ~AddressResolverName ();
+    ~AddressResolverName () override;
 
-    virtual Searcher::CallbackReturn
+    Searcher::CallbackReturn
     SearchCallback (SearchFilter &filter,
                     SymbolContext &context,
                     Address *addr,
-                    bool containing);
+                    bool containing) override;
 
-    virtual Searcher::Depth
-    GetDepth ();
+    Searcher::Depth
+    GetDepth () override;
 
-    virtual void
-    GetDescription (Stream *s);
+    void
+    GetDescription (Stream *s) override;
 
 protected:
     ConstString m_func_name;
@@ -65,4 +64,4 @@ private:
 
 } // namespace lldb_private
 
-#endif  // liblldb_AddressResolverName_h_
+#endif // liblldb_AddressResolverName_h_

Modified: lldb/trunk/include/lldb/Core/Event.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Core/Event.h?rev=243738&r1=243737&r2=243738&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Core/Event.h (original)
+++ lldb/trunk/include/lldb/Core/Event.h Fri Jul 31 03:17:10 2015
@@ -49,7 +49,6 @@ private:
     }
 
     DISALLOW_COPY_AND_ASSIGN (EventData);
-
 };
 
 //----------------------------------------------------------------------
@@ -67,17 +66,16 @@ public:
 
     EventDataBytes (const void *src, size_t src_len);
 
-    virtual
-    ~EventDataBytes();
+    ~EventDataBytes() override;
 
     //------------------------------------------------------------------
     // Member functions
     //------------------------------------------------------------------
-    virtual const ConstString &
-    GetFlavor () const;
+    const ConstString &
+    GetFlavor () const override;
 
-    virtual void
-    Dump (Stream *s) const;
+    void
+    Dump (Stream *s) const override;
 
     const void *
     GetBytes() const;
@@ -113,7 +111,6 @@ private:
     std::string m_bytes;
 
     DISALLOW_COPY_AND_ASSIGN (EventDataBytes);
-
 };
 
 //----------------------------------------------------------------------
@@ -184,7 +181,6 @@ public:
         m_data_ap.reset();
     }
 
-
 private:
     // This is only called by Listener when it pops an event off the queue for
     // the listener.  It calls the Event Data's DoOnRemoval() method, which is
@@ -214,4 +210,4 @@ private:
 
 } // namespace lldb_private
 
-#endif  // liblldb_Event_h_
+#endif // liblldb_Event_h_

Modified: lldb/trunk/include/lldb/Core/FileLineResolver.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Core/FileLineResolver.h?rev=243738&r1=243737&r2=243738&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Core/FileLineResolver.h (original)
+++ lldb/trunk/include/lldb/Core/FileLineResolver.h Fri Jul 31 03:17:10 2015
@@ -38,20 +38,19 @@ public:
                       uint32_t line_no,
                       bool check_inlines);
 
-    virtual
-    ~FileLineResolver ();
+    ~FileLineResolver () override;
 
-    virtual Searcher::CallbackReturn
+    Searcher::CallbackReturn
     SearchCallback (SearchFilter &filter,
                     SymbolContext &context,
                     Address *addr,
-                    bool containing);
+                    bool containing) override;
 
-    virtual Searcher::Depth
-    GetDepth ();
+    Searcher::Depth
+    GetDepth () override;
 
-    virtual void
-    GetDescription (Stream *s);
+    void
+    GetDescription (Stream *s) override;
 
     const SymbolContextList &
     GetFileLineMatches()
@@ -78,4 +77,4 @@ private:
 
 } // namespace lldb_private
 
-#endif  // liblldb_FileLineResolver_h_
+#endif // liblldb_FileLineResolver_h_

Modified: lldb/trunk/include/lldb/Core/History.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Core/History.h?rev=243738&r1=243737&r2=243738&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Core/History.h (original)
+++ lldb/trunk/include/lldb/Core/History.h Fri Jul 31 03:17:10 2015
@@ -82,7 +82,6 @@ private:
     collection m_events;
     
     DISALLOW_COPY_AND_ASSIGN (HistorySource);
-
 };
     
 //----------------------------------------------------------------------
@@ -103,8 +102,7 @@ class HistorySourceUInt : public History
     {
     }
     
-    virtual 
-    ~HistorySourceUInt()
+    ~HistorySourceUInt() override
     {
     }
     
@@ -112,44 +110,44 @@ class HistorySourceUInt : public History
     // in the subclass of this class to produce a history event and push it
     // onto the end of the history stack.
     
-    virtual HistoryEvent
-    CreateHistoryEvent ()
+    HistoryEvent
+    CreateHistoryEvent () override
     {
         ++m_curr_id;
         return (HistoryEvent)m_curr_id;
     }
     
-    virtual void
-    DeleteHistoryEvent (HistoryEvent event)
+    void
+    DeleteHistoryEvent (HistoryEvent event) override
     {
         // Nothing to delete, the event contains the integer
     }
     
-    virtual void
-    DumpHistoryEvent (Stream &strm, HistoryEvent event);
+    void
+    DumpHistoryEvent (Stream &strm, HistoryEvent event) override;
     
-    virtual size_t
-    GetHistoryEventCount()
+    size_t
+    GetHistoryEventCount() override
     {
         return m_curr_id;
     }
     
-    virtual HistoryEvent
-    GetHistoryEventAtIndex (uint32_t idx)
+    HistoryEvent
+    GetHistoryEventAtIndex (uint32_t idx) override
     {
         return (HistoryEvent)((uintptr_t)idx);
     }
     
-    virtual HistoryEvent
-    GetCurrentHistoryEvent ()
+    HistoryEvent
+    GetCurrentHistoryEvent () override
     {
         return (HistoryEvent)m_curr_id;
     }
     
     // Return 0 when lhs == rhs, 1 if lhs > rhs, or -1 if lhs < rhs.
-    virtual int
+    int
     CompareHistoryEvents (const HistoryEvent lhs, 
-                          const HistoryEvent rhs)
+                          const HistoryEvent rhs) override
     {
         uintptr_t lhs_uint = (uintptr_t)lhs;
         uintptr_t rhs_uint = (uintptr_t)rhs;
@@ -160,8 +158,8 @@ class HistorySourceUInt : public History
         return 0;
     }
     
-    virtual bool
-    IsCurrentHistoryEvent (const HistoryEvent event)
+    bool
+    IsCurrentHistoryEvent (const HistoryEvent event) override
     {
         return (uintptr_t)event == m_curr_id;
     }
@@ -171,7 +169,6 @@ protected:
     uintptr_t m_curr_id; // The current value of the history unsigned unteger
 };
 
-
 } // namespace lldb_private
 
-#endif	// lldb_History_h_
+#endif // lldb_History_h_

Modified: lldb/trunk/include/lldb/Core/StreamAsynchronousIO.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Core/StreamAsynchronousIO.h?rev=243738&r1=243737&r2=243738&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Core/StreamAsynchronousIO.h (original)
+++ lldb/trunk/include/lldb/Core/StreamAsynchronousIO.h Fri Jul 31 03:17:10 2015
@@ -22,14 +22,13 @@ class StreamAsynchronousIO :
 public:
     StreamAsynchronousIO (Debugger &debugger, bool for_stdout);
     
-    virtual ~StreamAsynchronousIO ();
+    ~StreamAsynchronousIO () override;
     
-    virtual void
-    Flush ();
-    
-    virtual size_t
-    Write (const void *src, size_t src_len);
+    void
+    Flush () override;
     
+    size_t
+    Write (const void *src, size_t src_len) override;
     
 private:
     Debugger &m_debugger;
@@ -38,4 +37,5 @@ private:
 };
 
 } // namespace lldb_private
-#endif // #ifndef liblldb_StreamAsynchronousIO_h
+
+#endif // liblldb_StreamAsynchronousIO_h

Modified: lldb/trunk/include/lldb/Core/StreamCallback.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Core/StreamCallback.h?rev=243738&r1=243737&r2=243738&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Core/StreamCallback.h (original)
+++ lldb/trunk/include/lldb/Core/StreamCallback.h Fri Jul 31 03:17:10 2015
@@ -24,14 +24,13 @@ class StreamCallback :
 public:
     StreamCallback (lldb::LogOutputCallback callback, void *baton);
     
-    virtual ~StreamCallback ();
+    ~StreamCallback () override;
     
-    virtual void
-    Flush ();
-    
-    virtual size_t
-    Write (const void *src, size_t src_len);
+    void
+    Flush () override;
     
+    size_t
+    Write (const void *src, size_t src_len) override;
     
 private:
     typedef std::map<lldb::tid_t, StreamString> collection;
@@ -44,4 +43,5 @@ private:
 };
 
 } // namespace lldb_private
-#endif // #ifndef liblldb_StreamCallback_h
+
+#endif // liblldb_StreamCallback_h

Modified: lldb/trunk/include/lldb/Core/StreamFile.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Core/StreamFile.h?rev=243738&r1=243737&r2=243738&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Core/StreamFile.h (original)
+++ lldb/trunk/include/lldb/Core/StreamFile.h Fri Jul 31 03:17:10 2015
@@ -43,8 +43,7 @@ public:
 
     StreamFile (FILE *fh, bool transfer_ownership);
 
-    virtual
-    ~StreamFile();
+    ~StreamFile() override;
 
     File &
     GetFile ()
@@ -58,11 +57,11 @@ public:
         return m_file;
     }
 
-    virtual void
-    Flush ();
+    void
+    Flush () override;
 
-    virtual size_t
-    Write (const void *s, size_t length);
+    size_t
+    Write (const void *s, size_t length) override;
 
 protected:
     //------------------------------------------------------------------
@@ -76,4 +75,4 @@ private:
 
 } // namespace lldb_private
 
-#endif  // liblldb_StreamFile_h_
+#endif // liblldb_StreamFile_h_

Modified: lldb/trunk/include/lldb/Core/StreamString.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Core/StreamString.h?rev=243738&r1=243737&r2=243738&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Core/StreamString.h (original)
+++ lldb/trunk/include/lldb/Core/StreamString.h Fri Jul 31 03:17:10 2015
@@ -25,14 +25,13 @@ public:
                   uint32_t addr_size,
                   lldb::ByteOrder byte_order);
 
-    virtual
-    ~StreamString ();
+    ~StreamString () override;
 
-    virtual void
-    Flush ();
+    void
+    Flush () override;
 
-    virtual size_t
-    Write (const void *s, size_t length);
+    size_t
+    Write (const void *s, size_t length) override;
 
     void
     Clear();
@@ -60,8 +59,8 @@ public:
 
 protected:
     std::string m_packet;
-
 };
 
 } // namespace lldb_private
-#endif  // #ifndef liblldb_StreamString_h_
+
+#endif // liblldb_StreamString_h_

Modified: lldb/trunk/include/lldb/Core/StreamTee.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Core/StreamTee.h?rev=243738&r1=243737&r2=243738&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Core/StreamTee.h (original)
+++ lldb/trunk/include/lldb/Core/StreamTee.h Fri Jul 31 03:17:10 2015
@@ -59,8 +59,7 @@ public:
         m_streams = rhs.m_streams;
     }
 
-    virtual
-    ~StreamTee ()
+    ~StreamTee () override
     {
     }
 
@@ -76,8 +75,8 @@ public:
         return *this;
     }
 
-    virtual void
-    Flush ()
+    void
+    Flush () override
     {
         Mutex::Locker locker (m_streams_mutex);
         collection::iterator pos, end;
@@ -93,8 +92,8 @@ public:
         }
     }
 
-    virtual size_t
-    Write (const void *s, size_t length)
+    size_t
+    Write (const void *s, size_t length) override
     {
         Mutex::Locker locker (m_streams_mutex);
         if (m_streams.empty())
@@ -164,7 +163,6 @@ public:
         m_streams[idx] = stream_sp;
     }
     
-
 protected:
     typedef std::vector<lldb::StreamSP> collection;
     mutable Mutex m_streams_mutex;
@@ -172,4 +170,5 @@ protected:
 };
 
 } // namespace lldb_private
-#endif  // #ifndef liblldb_StreamTee_h_
+
+#endif // liblldb_StreamTee_h_





More information about the lldb-commits mailing list