[Lldb-commits] [lldb] r251309 - Fix Clang-tidy modernize-use-override warnings in some files in source; other minor fixes.

Eugene Zelenko via lldb-commits lldb-commits at lists.llvm.org
Mon Oct 26 10:00:13 PDT 2015


Author: eugenezelenko
Date: Mon Oct 26 12:00:13 2015
New Revision: 251309

URL: http://llvm.org/viewvc/llvm-project?rev=251309&view=rev
Log:
Fix Clang-tidy modernize-use-override warnings in some files in source; other minor fixes.

Modified:
    lldb/trunk/source/Core/IOHandler.cpp
    lldb/trunk/source/Core/ValueObjectSyntheticFilter.cpp
    lldb/trunk/source/DataFormatters/VectorType.cpp
    lldb/trunk/source/Expression/Materializer.cpp
    lldb/trunk/source/Interpreter/CommandObjectScript.h

Modified: lldb/trunk/source/Core/IOHandler.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/IOHandler.cpp?rev=251309&r1=251308&r2=251309&view=diff
==============================================================================
--- lldb/trunk/source/Core/IOHandler.cpp (original)
+++ lldb/trunk/source/Core/IOHandler.cpp Mon Oct 26 12:00:13 2015
@@ -7,9 +7,17 @@
 //
 //===----------------------------------------------------------------------===//
 
+// C Includes
+#ifndef LLDB_DISABLE_CURSES
+#include <ncurses.h>
+#include <panel.h>
+#endif
 
+// C++ Includes
 #include <string>
 
+// Other libraries and framework includes
+// Project includes
 #include "lldb/Breakpoint/BreakpointLocation.h"
 #include "lldb/Core/IOHandler.h"
 #include "lldb/Core/Debugger.h"
@@ -28,11 +36,6 @@
 #include "lldb/Target/RegisterContext.h"
 #include "lldb/Target/ThreadPlan.h"
 
-#ifndef LLDB_DISABLE_CURSES
-#include <ncurses.h>
-#include <panel.h>
-#endif
-
 using namespace lldb;
 using namespace lldb_private;
 
@@ -46,7 +49,6 @@ IOHandler::IOHandler (Debugger &debugger
 {
 }
 
-
 IOHandler::IOHandler (Debugger &debugger,
                       IOHandler::Type type,
                       const lldb::StreamFileSP &input_sp,
@@ -71,10 +73,7 @@ IOHandler::IOHandler (Debugger &debugger
                                                   m_error_sp);
 }
 
-IOHandler::~IOHandler()
-{
-}
-
+IOHandler::~IOHandler() = default;
 
 int
 IOHandler::GetInputFD()
@@ -136,7 +135,6 @@ IOHandler::GetOutputStreamFile()
     return m_output_sp;
 }
 
-
 StreamFileSP &
 IOHandler::GetErrorStreamFile()
 {
@@ -204,10 +202,7 @@ IOHandlerConfirm::IOHandlerConfirm (Debu
     
 }
 
-
-IOHandlerConfirm::~IOHandlerConfirm ()
-{
-}
+IOHandlerConfirm::~IOHandlerConfirm() = default;
 
 int
 IOHandlerConfirm::IOHandlerComplete (IOHandler &io_handler,
@@ -334,11 +329,9 @@ IOHandlerDelegate::IOHandlerComplete (IO
         break;
     }
     
-    
     return 0;
 }
 
-
 IOHandlerEditline::IOHandlerEditline (Debugger &debugger,
                                       IOHandler::Type type,
                                       const char *editline_name, // Used for saving history files
@@ -444,7 +437,6 @@ IOHandlerEditline::Deactivate ()
     m_delegate.IOHandlerDeactivated(*this);
 }
 
-
 bool
 IOHandlerEditline::GetLine (std::string &line, bool &interrupted)
 {
@@ -619,7 +611,6 @@ IOHandlerEditline::GetContinuationPrompt
     return m_continuation_prompt.c_str();
 }
 
-
 void
 IOHandlerEditline::SetContinuationPrompt (const char *p)
 {
@@ -634,7 +625,6 @@ IOHandlerEditline::SetContinuationPrompt
 #endif
 }
 
-
 void
 IOHandlerEditline::SetBaseLineNumber (uint32_t line)
 {
@@ -824,6 +814,7 @@ type summary add -s "x=${var.x}, y=${var
 type summary add -s "w=${var.width}, h=${var.height}" curses::Size
 type summary add -s "${var.origin%S} ${var.size%S}" curses::Rect
 #endif
+
     struct Point
     {
         int x;
@@ -855,13 +846,13 @@ type summary add -s "${var.origin%S} ${v
         {
             printf ("(x=%i, y=%i)\n", x, y);
         }
-
     };
     
     bool operator == (const Point &lhs, const Point &rhs)
     {
         return lhs.x == rhs.x && lhs.y == rhs.y;
     }
+
     bool operator != (const Point &lhs, const Point &rhs)
     {
         return lhs.x != rhs.x || lhs.y != rhs.y;
@@ -889,13 +880,13 @@ type summary add -s "${var.origin%S} ${v
         {
             printf ("(w=%i, h=%i)\n", width, height);
         }
-
     };
     
     bool operator == (const Size &lhs, const Size &rhs)
     {
         return lhs.width == rhs.width && lhs.height == rhs.height;
     }
+
     bool operator != (const Size &lhs, const Size &rhs)
     {
         return lhs.width != rhs.width || lhs.height != rhs.height;
@@ -942,6 +933,7 @@ type summary add -s "${var.origin%S} ${v
                 size.height -= h*2;
             origin.y += h;
         }
+
         // Return a status bar rectangle which is the last line of
         // this rectangle. This rectangle will be modified to not
         // include the status bar area.
@@ -1011,7 +1003,6 @@ type summary add -s "${var.origin%S} ${v
             VerticalSplit (left_width, left, right);
         }
 
-
         void
         VerticalSplit (int left_width, Rect &left, Rect &right) const
         {
@@ -1035,6 +1026,7 @@ type summary add -s "${var.origin%S} ${v
     {
         return lhs.origin == rhs.origin && lhs.size == rhs.size;
     }
+
     bool operator != (const Rect &lhs, const Rect &rhs)
     {
         return lhs.origin != rhs.origin || lhs.size != rhs.size;
@@ -1064,9 +1056,7 @@ type summary add -s "${var.origin%S} ${v
     {
     public:
         virtual
-        ~WindowDelegate()
-        {
-        }
+        ~WindowDelegate() = default;
 
         virtual bool
         WindowDelegateDraw (Window &window, bool force)
@@ -1098,9 +1088,9 @@ type summary add -s "${var.origin%S} ${v
     {
     public:
         HelpDialogDelegate (const char *text, KeyHelp *key_help_array);
-        
+
         ~HelpDialogDelegate() override;
-        
+
         bool
         WindowDelegateDraw (Window &window, bool force) override;
         
@@ -1124,11 +1114,9 @@ type summary add -s "${var.origin%S} ${v
         int m_first_visible_line;
     };
 
-
     class Window
     {
     public:
-
         Window (const char *name) :
             m_name (name),
             m_window (NULL),
@@ -1726,6 +1714,7 @@ type summary add -s "${var.origin%S} ${v
         {
             return m_name.c_str();
         }
+
     protected:
         std::string m_name;
         WINDOW *m_window;
@@ -1747,8 +1736,8 @@ type summary add -s "${var.origin%S} ${v
     class MenuDelegate
     {
     public:
-        virtual ~MenuDelegate() {}
-        
+        virtual ~MenuDelegate() = default;
+
         virtual MenuActionResult
         MenuDelegateAction (Menu &menu) = 0;
     };
@@ -1772,10 +1761,8 @@ type summary add -s "${var.origin%S} ${v
               const char *key_name,
               int key_value,
               uint64_t identifier);
-        
-        ~Menu () override
-        {
-        }
+
+        ~Menu() override = default;
 
         const MenuDelegateSP &
         GetDelegate () const
@@ -1912,7 +1899,6 @@ type summary add -s "${var.origin%S} ${v
             return m_max_submenu_name_length + m_max_submenu_key_name_length + 8;
         }
 
-        
         uint64_t
         GetIdentifier() const
         {
@@ -2314,12 +2300,10 @@ type summary add -s "${var.origin%S} ${v
         }
         else if (menu_type == Menu::Type::Separator)
         {
-            
         }
         return result;
     }
 
-
     class Application
     {
     public:
@@ -2496,7 +2480,6 @@ type summary add -s "${var.origin%S} ${v
             }
             
             debugger.CancelForwardEvents (listener_sp);
-
         }
         
         WindowSP &
@@ -2520,11 +2503,9 @@ type summary add -s "${var.origin%S} ${v
         FILE *m_in;
         FILE *m_out;
     };
-    
 
 } // namespace curses
 
-
 using namespace curses;
 
 struct Row
@@ -2661,11 +2642,13 @@ class TreeDelegate
 {
 public:
     TreeDelegate() {}
-    virtual ~TreeDelegate() {}
+    virtual ~TreeDelegate() = default;
+
     virtual void TreeDelegateDrawTreeItem (TreeItem &item, Window &window) = 0;
     virtual void TreeDelegateGenerateChildren (TreeItem &item) = 0;
     virtual bool TreeDelegateItemSelected (TreeItem &item) = 0; // Return true if we need to update views
 };
+
 typedef std::shared_ptr<TreeDelegate> TreeDelegateSP;
 
 class TreeItem
@@ -2751,6 +2734,7 @@ public:
     {
         m_delegate.TreeDelegateItemSelected(*this);
     }
+
     void
     CalculateRowIndexes (int &row_idx)
     {
@@ -2944,7 +2928,6 @@ public:
     {
         m_identifier = identifier;
     }
-    
 
     void
     SetMightHaveChildren (bool b)
@@ -2961,7 +2944,6 @@ protected:
     std::vector<TreeItem> m_children;
     bool m_might_have_children;
     bool m_is_expanded;
-
 };
 
 class TreeWindowDelegate : public WindowDelegate
@@ -3052,8 +3034,7 @@ public:
         
         return true; // Drawing handled
     }
-    
-    
+
     const char *
     WindowDelegateGetHelpText () override
     {
@@ -3125,6 +3106,7 @@ public:
                         m_selected_item->ItemWasSelected ();
                 }
                 return eKeyHandled;
+
             case KEY_DOWN:
                 if (m_selected_row_idx + 1 < m_num_rows)
                 {
@@ -3191,7 +3173,6 @@ protected:
     int m_min_y;
     int m_max_x;
     int m_max_y;
-
 };
 
 class FrameTreeDelegate : public TreeDelegate
@@ -3203,11 +3184,9 @@ public:
         FormatEntity::Parse ("frame #${frame.index}: {${function.name}${function.pc-offset}}}",
                              m_format);
     }
-    
-    ~FrameTreeDelegate() override
-    {
-    }
-    
+
+    ~FrameTreeDelegate() override = default;
+
     void
     TreeDelegateDrawTreeItem (TreeItem &item, Window &window) override
     {
@@ -3229,6 +3208,7 @@ public:
             }
         }
     }
+
     void
     TreeDelegateGenerateChildren (TreeItem &item)  override
     {
@@ -3248,6 +3228,7 @@ public:
         }
         return false;
     }
+
 protected:
     FormatEntity::Entry m_format;
 };
@@ -3264,11 +3245,9 @@ public:
         FormatEntity::Parse ("thread #${thread.index}: tid = ${thread.id}{, stop reason = ${thread.stop-reason}}",
                              m_format);
     }
-    
-    ~ThreadTreeDelegate()  override
-    {
-    }
-    
+
+    ~ThreadTreeDelegate() override = default;
+
     ProcessSP
     GetProcess ()
     {
@@ -3299,6 +3278,7 @@ public:
             }
         }
     }
+
     void
     TreeDelegateGenerateChildren (TreeItem &item) override
     {
@@ -3369,7 +3349,6 @@ protected:
     lldb::user_id_t m_tid;
     uint32_t m_stop_id;
     FormatEntity::Entry m_format;
-
 };
 
 class ThreadsTreeDelegate : public TreeDelegate
@@ -3384,11 +3363,9 @@ public:
         FormatEntity::Parse("process ${process.id}{, name = ${process.name}}",
                             m_format);
     }
-    
-    ~ThreadsTreeDelegate() override
-    {
-    }
-    
+
+    ~ThreadsTreeDelegate() override = default;
+
     ProcessSP
     GetProcess ()
     {
@@ -3460,7 +3437,6 @@ protected:
     Debugger &m_debugger;
     uint32_t m_stop_id;
     FormatEntity::Entry m_format;
-
 };
 
 class ValueObjectListDelegate : public WindowDelegate
@@ -3490,10 +3466,8 @@ public:
     {
         SetValues (valobj_list);
     }
-    
-    ~ValueObjectListDelegate() override
-    {
-    }
+
+    ~ValueObjectListDelegate() override = default;
 
     void
     SetValues (ValueObjectList &valobj_list)
@@ -3586,7 +3560,6 @@ public:
         return g_source_view_key_help;
     }
 
-    
     HandleCharResult
     WindowDelegateHandleChar (Window &window, int c) override
     {
@@ -3646,6 +3619,7 @@ public:
                 if (m_selected_row_idx > 0)
                     --m_selected_row_idx;
                 return eKeyHandled;
+
             case KEY_DOWN:
                 if (m_selected_row_idx + 1 < m_num_rows)
                     ++m_selected_row_idx;
@@ -3784,6 +3758,7 @@ protected:
         
         return true;
     }
+
     void
     DisplayRows (Window &window,
                  std::vector<Row> &rows,
@@ -3845,6 +3820,7 @@ protected:
         }
         return row_count;
     }
+
     static Row *
     GetRowForRowIndexImpl (std::vector<Row> &rows, size_t &row_index)
     {
@@ -3890,11 +3866,9 @@ public:
         m_frame_block (NULL)
     {
     }
-    
-    ~FrameVariablesWindowDelegate() override
-    {
-    }
-    
+
+    ~FrameVariablesWindowDelegate() override = default;
+
     const char *
     WindowDelegateGetHelpText () override
     {
@@ -3924,7 +3898,6 @@ public:
             }
         }
 
-        
         ValueObjectList local_values;
         if (frame_block)
         {
@@ -3964,7 +3937,6 @@ public:
         }
         
         return ValueObjectListDelegate::WindowDelegateDraw (window, force);
-
     }
 
 protected:
@@ -3972,7 +3944,6 @@ protected:
     Block *m_frame_block;
 };
 
-
 class RegistersWindowDelegate : public ValueObjectListDelegate
 {
 public:
@@ -3982,10 +3953,8 @@ public:
     {
     }
 
-    ~RegistersWindowDelegate()
-    {
-    }
-    
+    ~RegistersWindowDelegate() override = default;
+
     const char *
     WindowDelegateGetHelpText () override
     {
@@ -4168,9 +4137,7 @@ HelpDialogDelegate::HelpDialogDelegate (
     }
 }
 
-HelpDialogDelegate::~HelpDialogDelegate()
-{
-}
+HelpDialogDelegate::~HelpDialogDelegate() = default;
     
 bool
 HelpDialogDelegate::WindowDelegateDraw (Window &window, bool force)
@@ -4235,6 +4202,7 @@ HelpDialogDelegate::WindowDelegateHandle
                         m_first_visible_line = 0;
                 }
                 break;
+
             case KEY_NPAGE:
             case '.':
                 if (m_first_visible_line + num_visible_lines < num_lines)
@@ -4244,6 +4212,7 @@ HelpDialogDelegate::WindowDelegateHandle
                         m_first_visible_line = num_lines - num_visible_lines;
                 }
                 break;
+
             default:
                 done = true;
                 break;
@@ -4298,10 +4267,8 @@ public:
         m_debugger (debugger)
     {
     }
-    
-    ~ApplicationDelegate ()
-    {
-    }
+
+    ~ApplicationDelegate() override = default;
 
     bool
     WindowDelegateDraw (Window &window, bool force) override
@@ -4330,8 +4297,7 @@ public:
         }
         return eKeyNotHandled;
     }
-    
-    
+
     const char *
     WindowDelegateGetHelpText () override
     {
@@ -4626,7 +4592,6 @@ protected:
     Debugger &m_debugger;
 };
 
-
 class StatusBarWindowDelegate : public WindowDelegate
 {
 public:
@@ -4636,10 +4601,8 @@ public:
         FormatEntity::Parse("Thread: ${thread.id%tid}",
                             m_format);
     }
-    
-    ~StatusBarWindowDelegate ()
-    {
-    }
+
+    ~StatusBarWindowDelegate() override = default;
 
     bool
     WindowDelegateDraw (Window &window, bool force) override
@@ -4713,9 +4676,7 @@ public:
     {
     }
 
-    ~SourceFileWindowDelegate() override
-    {
-    }
+    ~SourceFileWindowDelegate() override = default;
 
     void
     Update (const SymbolContext &sc)
@@ -5063,7 +5024,6 @@ public:
                     }
                     if (highlight_attr)
                         window.AttributeOff(highlight_attr);
-
                 }
                 else
                 {
@@ -5240,6 +5200,7 @@ public:
             return m_file_sp->GetNumLines();
         return 0;
     }
+
     size_t
     GetNumDisassemblyLines () const
     {
@@ -5404,6 +5365,7 @@ public:
                     }
                 }
                 return eKeyHandled;
+
             case 'n':   // 'n' == step over
             case 'N':   // 'N' == step over instruction
                 {
@@ -5415,6 +5377,7 @@ public:
                     }
                 }
                 return eKeyHandled;
+
             case 's':   // 's' == step into
             case 'S':   // 'S' == step into instruction
                 {
@@ -5460,7 +5423,6 @@ protected:
     int m_min_y;
     int m_max_x;
     int m_max_y;
-
 };
 
 DisplayOptions ValueObjectListDelegate::g_options = { true };
@@ -5477,8 +5439,7 @@ IOHandlerCursesGUI::Activate ()
     if (!m_app_ap)
     {
         m_app_ap.reset (new Application (GetInputFILE(), GetOutputFILE()));
-        
-        
+
         // This is both a window and a menu delegate
         std::shared_ptr<ApplicationDelegate> app_delegate_sp(new ApplicationDelegate(*m_app_ap, m_debugger));
         
@@ -5578,7 +5539,6 @@ IOHandlerCursesGUI::Activate ()
         init_pair (3, COLOR_MAGENTA , COLOR_WHITE );
         init_pair (4, COLOR_MAGENTA , COLOR_BLACK );
         init_pair (5, COLOR_RED     , COLOR_BLACK );
-
     }
 }
 
@@ -5595,11 +5555,7 @@ IOHandlerCursesGUI::Run ()
     SetIsDone(true);
 }
 
-
-IOHandlerCursesGUI::~IOHandlerCursesGUI ()
-{
-    
-}
+IOHandlerCursesGUI::~IOHandlerCursesGUI() = default;
 
 void
 IOHandlerCursesGUI::Cancel ()
@@ -5612,10 +5568,9 @@ IOHandlerCursesGUI::Interrupt ()
     return false;
 }
 
-
 void
 IOHandlerCursesGUI::GotEOF()
 {
 }
 
-#endif // #ifndef LLDB_DISABLE_CURSES
+#endif // LLDB_DISABLE_CURSES

Modified: lldb/trunk/source/Core/ValueObjectSyntheticFilter.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/ValueObjectSyntheticFilter.cpp?rev=251309&r1=251308&r2=251309&view=diff
==============================================================================
--- lldb/trunk/source/Core/ValueObjectSyntheticFilter.cpp (original)
+++ lldb/trunk/source/Core/ValueObjectSyntheticFilter.cpp Mon Oct 26 12:00:13 2015
@@ -1,4 +1,4 @@
-//===-- ValueObjectSyntheticFilter.cpp -----------------------------*- C++ -*-===//
+//===-- ValueObjectSyntheticFilter.cpp --------------------------*- C++ -*-===//
 //
 //                     The LLVM Compiler Infrastructure
 //
@@ -7,12 +7,11 @@
 //
 //===----------------------------------------------------------------------===//
 
-#include "lldb/Core/ValueObjectSyntheticFilter.h"
-
 // C Includes
 // C++ Includes
 // Other libraries and framework includes
 // Project includes
+#include "lldb/Core/ValueObjectSyntheticFilter.h"
 #include "lldb/Core/ValueObject.h"
 #include "lldb/DataFormatters/TypeSynthetic.h"
 
@@ -26,35 +25,34 @@ public:
     {}
 
     size_t
-    CalculateNumChildren ()
+    CalculateNumChildren() override
     {
         return m_backend.GetNumChildren();
     }
     
     lldb::ValueObjectSP
-    GetChildAtIndex (size_t idx)
+    GetChildAtIndex(size_t idx) override
     {
         return m_backend.GetChildAtIndex(idx, true);
     }
 
     size_t
-    GetIndexOfChildWithName (const ConstString &name)
+    GetIndexOfChildWithName(const ConstString &name) override
     {
         return m_backend.GetIndexOfChildWithName(name);
     }
     
     bool
-    MightHaveChildren ()
+    MightHaveChildren() override
     {
         return true;
     }
     
     bool
-    Update()
+    Update() override
     {
         return false;
     }
-
 };
 
 ValueObjectSynthetic::ValueObjectSynthetic (ValueObject &parent, lldb::SyntheticChildrenSP filter) :
@@ -78,9 +76,7 @@ ValueObjectSynthetic::ValueObjectSynthet
     CreateSynthFilter();
 }
 
-ValueObjectSynthetic::~ValueObjectSynthetic()
-{
-}
+ValueObjectSynthetic::~ValueObjectSynthetic() = default;
 
 CompilerType
 ValueObjectSynthetic::GetCompilerTypeImpl ()
@@ -221,7 +217,7 @@ ValueObjectSynthetic::GetChildAtIndex (s
     ValueObject *valobj;
     if (m_children_byindex.GetValueForKey(idx, valobj) == false)
     {
-        if (can_create && m_synth_filter_ap.get() != NULL)
+        if (can_create && m_synth_filter_ap.get() != nullptr)
         {
             lldb::ValueObjectSP synth_guy = m_synth_filter_ap->GetChildAtIndex (idx);
             if (!synth_guy)
@@ -258,7 +254,7 @@ ValueObjectSynthetic::GetIndexOfChildWit
     uint32_t found_index = UINT32_MAX;
     bool did_find = m_name_toindex.GetValueForKey(name.GetCString(), found_index);
     
-    if (!did_find && m_synth_filter_ap.get() != NULL)
+    if (!did_find && m_synth_filter_ap.get() != nullptr)
     {
         uint32_t index = m_synth_filter_ap->GetIndexOfChildWithName (name);
         if (index == UINT32_MAX)
@@ -266,7 +262,7 @@ ValueObjectSynthetic::GetIndexOfChildWit
         m_name_toindex.SetValueForKey(name.GetCString(), index);
         return index;
     }
-    else if (!did_find && m_synth_filter_ap.get() == NULL)
+    else if (!did_find && m_synth_filter_ap.get() == nullptr)
         return UINT32_MAX;
     else /*if (iter != m_name_toindex.end())*/
         return found_index;

Modified: lldb/trunk/source/DataFormatters/VectorType.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/DataFormatters/VectorType.cpp?rev=251309&r1=251308&r2=251309&view=diff
==============================================================================
--- lldb/trunk/source/DataFormatters/VectorType.cpp (original)
+++ lldb/trunk/source/DataFormatters/VectorType.cpp Mon Oct 26 12:00:13 2015
@@ -1,4 +1,4 @@
-//===-- VectorType.cpp ---------------------------------------------*- C++ -*-===//
+//===-- VectorType.cpp ------------------------------------------*- C++ -*-===//
 //
 //                     The LLVM Compiler Infrastructure
 //
@@ -7,6 +7,10 @@
 //
 //===----------------------------------------------------------------------===//
 
+// C Includes
+// C++ Includes
+// Other libraries and framework includes
+// Project includes
 #include "lldb/DataFormatters/VectorType.h"
 
 #include "lldb/Core/ValueObject.h"
@@ -200,15 +204,17 @@ namespace lldb_private {
             m_child_type(),
             m_num_children(0)
             {}
-            
-            virtual size_t
-            CalculateNumChildren ()
+
+            ~VectorTypeSyntheticFrontEnd() override = default;
+
+            size_t
+            CalculateNumChildren() override
             {
                 return m_num_children;
             }
-            
-            virtual lldb::ValueObjectSP
-            GetChildAtIndex (size_t idx)
+
+            lldb::ValueObjectSP
+            GetChildAtIndex(size_t idx) override
             {
                 if (idx >= CalculateNumChildren())
                     return lldb::ValueObjectSP();
@@ -226,8 +232,8 @@ namespace lldb_private {
                 return child_sp;
             }
 
-            virtual bool
-            Update()
+            bool
+            Update() override
             {
                 m_parent_format = m_backend.GetFormat();
                 CompilerType parent_type(m_backend.GetCompilerType());
@@ -243,15 +249,15 @@ namespace lldb_private {
                                                        m_child_type);
                 return false;
             }
-            
-            virtual bool
-            MightHaveChildren ()
+
+            bool
+            MightHaveChildren() override
             {
                 return true;
             }
-            
-            virtual size_t
-            GetIndexOfChildWithName (const ConstString &name)
+
+            size_t
+            GetIndexOfChildWithName(const ConstString &name) override
             {
                 const char* item_name = name.GetCString();
                 uint32_t idx = ExtractIndexFromString(item_name);
@@ -259,18 +265,16 @@ namespace lldb_private {
                     return UINT32_MAX;
                 return idx;
             }
-            
-            virtual
-            ~VectorTypeSyntheticFrontEnd () {}
-            
+
         private:
             lldb::Format m_parent_format;
             lldb::Format m_item_format;
             CompilerType m_child_type;
             size_t m_num_children;
         };
-    }
-}
+
+    } // namespace formatters
+} // namespace lldb_private
 
 bool
 lldb_private::formatters::VectorTypeSummaryProvider (ValueObject& valobj,
@@ -321,6 +325,6 @@ lldb_private::SyntheticChildrenFrontEnd*
 lldb_private::formatters::VectorTypeSyntheticFrontEndCreator (CXXSyntheticChildren*, lldb::ValueObjectSP valobj_sp)
 {
     if (!valobj_sp)
-        return NULL;
-    return (new VectorTypeSyntheticFrontEnd(valobj_sp));
+        return nullptr;
+    return new VectorTypeSyntheticFrontEnd(valobj_sp);
 }

Modified: lldb/trunk/source/Expression/Materializer.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Expression/Materializer.cpp?rev=251309&r1=251308&r2=251309&view=diff
==============================================================================
--- lldb/trunk/source/Expression/Materializer.cpp (original)
+++ lldb/trunk/source/Expression/Materializer.cpp Mon Oct 26 12:00:13 2015
@@ -7,6 +7,10 @@
 //
 //===----------------------------------------------------------------------===//
 
+// C Includes
+// C++ Includes
+// Other libraries and framework includes
+// Project includes
 #include "lldb/Core/Log.h"
 #include "lldb/Core/RegisterValue.h"
 #include "lldb/Core/ValueObjectConstResult.h"
@@ -148,7 +152,10 @@ public:
         }
     }
     
-    void Materialize (lldb::StackFrameSP &frame_sp, IRMemoryMap &map, lldb::addr_t process_address, Error &err)
+    void Materialize(lldb::StackFrameSP &frame_sp,
+                     IRMemoryMap &map,
+                     lldb::addr_t process_address,
+                     Error &err) override
     {
         Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_EXPRESSIONS));
 
@@ -193,12 +200,12 @@ public:
         }
     }
     
-    void Dematerialize (lldb::StackFrameSP &frame_sp,
-                        IRMemoryMap &map,
-                        lldb::addr_t process_address,
-                        lldb::addr_t frame_top,
-                        lldb::addr_t frame_bottom,
-                        Error &err)
+    void Dematerialize(lldb::StackFrameSP &frame_sp,
+                       IRMemoryMap &map,
+                       lldb::addr_t process_address,
+                       lldb::addr_t frame_top,
+                       lldb::addr_t frame_bottom,
+                       Error &err) override
     {
         Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_EXPRESSIONS));
         
@@ -326,7 +333,7 @@ public:
         }
     }
     
-    void DumpToLog (IRMemoryMap &map, lldb::addr_t process_address, Log *log)
+    void DumpToLog(IRMemoryMap &map, lldb::addr_t process_address, Log *log) override
     {
         StreamString dump_stream;
         
@@ -392,9 +399,10 @@ public:
         log->PutCString(dump_stream.GetData());
     }
     
-    void Wipe (IRMemoryMap &map, lldb::addr_t process_address)
+    void Wipe(IRMemoryMap &map, lldb::addr_t process_address) override
     {
     }
+
 private:
     lldb::ExpressionVariableSP m_persistent_variable_sp;
     Materializer::PersistentVariableDelegate *m_delegate;
@@ -428,7 +436,10 @@ public:
         m_is_reference = m_variable_sp->GetType()->GetForwardCompilerType ().IsReferenceType();
     }
     
-    void Materialize (lldb::StackFrameSP &frame_sp, IRMemoryMap &map, lldb::addr_t process_address, Error &err)
+    void Materialize(lldb::StackFrameSP &frame_sp,
+                     IRMemoryMap &map,
+                     lldb::addr_t process_address,
+                     Error &err) override
     {
         Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_EXPRESSIONS));
         
@@ -575,12 +586,12 @@ public:
         }
     }
     
-    void Dematerialize (lldb::StackFrameSP &frame_sp,
-                        IRMemoryMap &map,
-                        lldb::addr_t process_address,
-                        lldb::addr_t frame_top,
-                        lldb::addr_t frame_bottom,
-                        Error &err)
+    void Dematerialize(lldb::StackFrameSP &frame_sp,
+                       IRMemoryMap &map,
+                       lldb::addr_t process_address,
+                       lldb::addr_t frame_top,
+                       lldb::addr_t frame_bottom,
+                       Error &err) override
     {
         Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_EXPRESSIONS));
 
@@ -659,7 +670,7 @@ public:
         }
     }
     
-    void DumpToLog (IRMemoryMap &map, lldb::addr_t process_address, Log *log)
+    void DumpToLog(IRMemoryMap &map, lldb::addr_t process_address, Log *log) override
     {
         StreamString dump_stream;
 
@@ -731,7 +742,7 @@ public:
         log->PutCString(dump_stream.GetData());
     }
     
-    void Wipe (IRMemoryMap &map, lldb::addr_t process_address)
+    void Wipe(IRMemoryMap &map, lldb::addr_t process_address) override
     {
         if (m_temporary_allocation != LLDB_INVALID_ADDRESS)
         {
@@ -744,6 +755,7 @@ public:
         }
 
     }
+
 private:
     lldb::VariableSP    m_variable_sp;
     bool                m_is_reference;
@@ -782,7 +794,10 @@ public:
         m_alignment = 8;
     }
     
-    void Materialize (lldb::StackFrameSP &frame_sp, IRMemoryMap &map, lldb::addr_t process_address, Error &err)
+    void Materialize(lldb::StackFrameSP &frame_sp,
+                     IRMemoryMap &map,
+                     lldb::addr_t process_address,
+                     Error &err) override
     {
         if (!m_is_program_reference)
         {
@@ -823,12 +838,12 @@ public:
         }
     }
     
-    void Dematerialize (lldb::StackFrameSP &frame_sp,
-                        IRMemoryMap &map,
-                        lldb::addr_t process_address,
-                        lldb::addr_t frame_top,
-                        lldb::addr_t frame_bottom,
-                        Error &err)
+    void Dematerialize(lldb::StackFrameSP &frame_sp,
+                       IRMemoryMap &map,
+                       lldb::addr_t process_address,
+                       lldb::addr_t frame_top,
+                       lldb::addr_t frame_bottom,
+                       Error &err) override
     {
         err.Clear();
         
@@ -942,7 +957,7 @@ public:
         m_temporary_allocation_size = 0;
     }
     
-    void DumpToLog (IRMemoryMap &map, lldb::addr_t process_address, Log *log)
+    void DumpToLog(IRMemoryMap &map, lldb::addr_t process_address, Log *log) override
     {
         StreamString dump_stream;
         
@@ -1015,7 +1030,7 @@ public:
         log->PutCString(dump_stream.GetData());
     }
     
-    void Wipe (IRMemoryMap &map, lldb::addr_t process_address)
+    void Wipe(IRMemoryMap &map, lldb::addr_t process_address) override
     {
         if (!m_keep_in_memory && m_temporary_allocation != LLDB_INVALID_ADDRESS)
         {
@@ -1027,6 +1042,7 @@ public:
         m_temporary_allocation = LLDB_INVALID_ADDRESS;
         m_temporary_allocation_size = 0;
     }
+
 private:
     CompilerType    m_type;
     bool            m_is_program_reference;
@@ -1063,7 +1079,10 @@ public:
         m_alignment = 8;
     }
     
-    void Materialize (lldb::StackFrameSP &frame_sp, IRMemoryMap &map, lldb::addr_t process_address, Error &err)
+    void Materialize(lldb::StackFrameSP &frame_sp,
+                     IRMemoryMap &map,
+                     lldb::addr_t process_address,
+                     Error &err) override
     {
         Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_EXPRESSIONS));
 
@@ -1107,12 +1126,12 @@ public:
         }
     }
     
-    void Dematerialize (lldb::StackFrameSP &frame_sp,
-                        IRMemoryMap &map,
-                        lldb::addr_t process_address,
-                        lldb::addr_t frame_top,
-                        lldb::addr_t frame_bottom,
-                        Error &err)
+    void Dematerialize(lldb::StackFrameSP &frame_sp,
+                       IRMemoryMap &map,
+                       lldb::addr_t process_address,
+                       lldb::addr_t frame_top,
+                       lldb::addr_t frame_bottom,
+                       Error &err) override
     {
         Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_EXPRESSIONS));
 
@@ -1128,7 +1147,7 @@ public:
         // no work needs to be done
     }
     
-    void DumpToLog (IRMemoryMap &map, lldb::addr_t process_address, Log *log)
+    void DumpToLog(IRMemoryMap &map, lldb::addr_t process_address, Log *log) override
     {
         StreamString dump_stream;
         
@@ -1162,9 +1181,10 @@ public:
         log->PutCString(dump_stream.GetData());
     }
     
-    void Wipe (IRMemoryMap &map, lldb::addr_t process_address)
+    void Wipe(IRMemoryMap &map, lldb::addr_t process_address) override
     {
     }
+
 private:
     Symbol m_symbol;
 };
@@ -1191,7 +1211,10 @@ public:
         m_alignment = m_register_info.byte_size;
     }
     
-    void Materialize (lldb::StackFrameSP &frame_sp, IRMemoryMap &map, lldb::addr_t process_address, Error &err)
+    void Materialize(lldb::StackFrameSP &frame_sp,
+                     IRMemoryMap &map,
+                     lldb::addr_t process_address,
+                     Error &err) override
     {
         Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_EXPRESSIONS));
         
@@ -1247,12 +1270,12 @@ public:
         }
     }
     
-    void Dematerialize (lldb::StackFrameSP &frame_sp,
-                        IRMemoryMap &map,
-                        lldb::addr_t process_address,
-                        lldb::addr_t frame_top,
-                        lldb::addr_t frame_bottom,
-                        Error &err)
+    void Dematerialize(lldb::StackFrameSP &frame_sp,
+                       IRMemoryMap &map,
+                       lldb::addr_t process_address,
+                       lldb::addr_t frame_top,
+                       lldb::addr_t frame_bottom,
+                       Error &err) override
     {
         Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_EXPRESSIONS));
         
@@ -1304,7 +1327,7 @@ public:
         }
     }
     
-    void DumpToLog (IRMemoryMap &map, lldb::addr_t process_address, Log *log)
+    void DumpToLog(IRMemoryMap &map, lldb::addr_t process_address, Log *log) override
     {
         StreamString dump_stream;
         
@@ -1339,9 +1362,10 @@ public:
         log->PutCString(dump_stream.GetData());
     }
     
-    void Wipe (IRMemoryMap &map, lldb::addr_t process_address)
+    void Wipe(IRMemoryMap &map, lldb::addr_t process_address) override
     {
     }
+
 private:
     RegisterInfo m_register_info;
     lldb::DataBufferSP m_register_contents;
@@ -1474,12 +1498,9 @@ Materializer::Dematerializer::Wipe ()
         entity_up->Wipe (*m_map, m_process_address);
     }
 
-    m_materializer = NULL;
-    m_map = NULL;
+    m_materializer = nullptr;
+    m_map = nullptr;
     m_process_address = LLDB_INVALID_ADDRESS;
 }
 
-Materializer::PersistentVariableDelegate::~PersistentVariableDelegate()
-{
-}
-
+Materializer::PersistentVariableDelegate::~PersistentVariableDelegate() = default;

Modified: lldb/trunk/source/Interpreter/CommandObjectScript.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Interpreter/CommandObjectScript.h?rev=251309&r1=251308&r2=251309&view=diff
==============================================================================
--- lldb/trunk/source/Interpreter/CommandObjectScript.h (original)
+++ lldb/trunk/source/Interpreter/CommandObjectScript.h Mon Oct 26 12:00:13 2015
@@ -25,18 +25,16 @@ namespace lldb_private {
 class CommandObjectScript : public CommandObjectRaw
 {
 public:
+    CommandObjectScript(CommandInterpreter &interpreter,
+                        lldb::ScriptLanguage script_lang);
 
-    CommandObjectScript (CommandInterpreter &interpreter,
-                         lldb::ScriptLanguage script_lang);
-
-    virtual
-    ~CommandObjectScript ();
+    ~CommandObjectScript() override;
 
 protected:
-    virtual bool
-    DoExecute (const char *command, CommandReturnObject &result);
+    bool
+    DoExecute(const char *command, CommandReturnObject &result) override;
 };
 
 } // namespace lldb_private
 
-#endif  // liblldb_CommandObjectScript_h_
+#endif // liblldb_CommandObjectScript_h_




More information about the lldb-commits mailing list