From: Pavel Labath Date: Fri, 31 Jul 2015 08:17:10 +0000 (+0000) Subject: Fix Clang-tidy misc-use-override warnings in some files in include/lldb/Core, unify... X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=7fb4e2d4ac793d8f6a72a2c56d11675d6de60d4e;p=platform%2Fupstream%2Fllvm.git 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 llvm-svn: 243738 --- diff --git a/lldb/include/lldb/Core/AddressResolver.h b/lldb/include/lldb/Core/AddressResolver.h index e5fe276..711cc57 100644 --- a/lldb/include/lldb/Core/AddressResolver.h +++ b/lldb/include/lldb/Core/AddressResolver.h @@ -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 & GetAddressRanges (); @@ -86,4 +85,4 @@ private: } // namespace lldb_private -#endif // liblldb_AddressResolver_h_ +#endif // liblldb_AddressResolver_h_ diff --git a/lldb/include/lldb/Core/AddressResolverFileLine.h b/lldb/include/lldb/Core/AddressResolverFileLine.h index ddeb0e0..5b47379 100644 --- a/lldb/include/lldb/Core/AddressResolverFileLine.h +++ b/lldb/include/lldb/Core/AddressResolverFileLine.h @@ -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_ diff --git a/lldb/include/lldb/Core/AddressResolverName.h b/lldb/include/lldb/Core/AddressResolverName.h index afde675..cf792f5 100644 --- a/lldb/include/lldb/Core/AddressResolverName.h +++ b/lldb/include/lldb/Core/AddressResolverName.h @@ -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_ diff --git a/lldb/include/lldb/Core/Event.h b/lldb/include/lldb/Core/Event.h index 1c3eec0..c7b27e0 100644 --- a/lldb/include/lldb/Core/Event.h +++ b/lldb/include/lldb/Core/Event.h @@ -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_ diff --git a/lldb/include/lldb/Core/FileLineResolver.h b/lldb/include/lldb/Core/FileLineResolver.h index e1928f1..f0f7fbd 100644 --- a/lldb/include/lldb/Core/FileLineResolver.h +++ b/lldb/include/lldb/Core/FileLineResolver.h @@ -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_ diff --git a/lldb/include/lldb/Core/History.h b/lldb/include/lldb/Core/History.h index b362688..fbb7bd8 100644 --- a/lldb/include/lldb/Core/History.h +++ b/lldb/include/lldb/Core/History.h @@ -82,7 +82,6 @@ private: collection m_events; DISALLOW_COPY_AND_ASSIGN (HistorySource); - }; //---------------------------------------------------------------------- @@ -103,8 +102,7 @@ class HistorySourceUInt : public HistorySource { } - virtual - ~HistorySourceUInt() + ~HistorySourceUInt() override { } @@ -112,44 +110,44 @@ class HistorySourceUInt : public HistorySource // 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 HistorySource 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_ diff --git a/lldb/include/lldb/Core/StreamAsynchronousIO.h b/lldb/include/lldb/Core/StreamAsynchronousIO.h index d3b0544..b069cfd 100644 --- a/lldb/include/lldb/Core/StreamAsynchronousIO.h +++ b/lldb/include/lldb/Core/StreamAsynchronousIO.h @@ -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 diff --git a/lldb/include/lldb/Core/StreamCallback.h b/lldb/include/lldb/Core/StreamCallback.h index b5fb91c..e5a9da7 100644 --- a/lldb/include/lldb/Core/StreamCallback.h +++ b/lldb/include/lldb/Core/StreamCallback.h @@ -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 collection; @@ -44,4 +43,5 @@ private: }; } // namespace lldb_private -#endif // #ifndef liblldb_StreamCallback_h + +#endif // liblldb_StreamCallback_h diff --git a/lldb/include/lldb/Core/StreamFile.h b/lldb/include/lldb/Core/StreamFile.h index 55bb361..781f0a5 100644 --- a/lldb/include/lldb/Core/StreamFile.h +++ b/lldb/include/lldb/Core/StreamFile.h @@ -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_ diff --git a/lldb/include/lldb/Core/StreamString.h b/lldb/include/lldb/Core/StreamString.h index 1aa46dd..5b6bde7 100644 --- a/lldb/include/lldb/Core/StreamString.h +++ b/lldb/include/lldb/Core/StreamString.h @@ -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_ diff --git a/lldb/include/lldb/Core/StreamTee.h b/lldb/include/lldb/Core/StreamTee.h index e2a29a3..7ab619b 100644 --- a/lldb/include/lldb/Core/StreamTee.h +++ b/lldb/include/lldb/Core/StreamTee.h @@ -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 collection; mutable Mutex m_streams_mutex; @@ -172,4 +170,5 @@ protected: }; } // namespace lldb_private -#endif // #ifndef liblldb_StreamTee_h_ + +#endif // liblldb_StreamTee_h_