summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPavel Labath <labath@google.com>2015-08-18 08:54:26 +0000
committerPavel Labath <labath@google.com>2015-08-18 08:54:26 +0000
commite6f9abfd91c1e08db92765d3102461e25a13ac8d (patch)
treef32bd474c934c7e24f9f2c59eab75edfabd74028
parent19ffd57f457e522de87e825d1362a6f84b7113aa (diff)
downloadbcm5719-llvm-e6f9abfd91c1e08db92765d3102461e25a13ac8d.tar.gz
bcm5719-llvm-e6f9abfd91c1e08db92765d3102461e25a13ac8d.zip
Fix Clang-tidy misc-use-override warnings in include/lldb/Utility and some files in include/lldb/Target, unify closing inclusion guards
patch by Eugene Zelenko. Differential Revision: http://reviews.llvm.org/D11701 llvm-svn: 245277
-rw-r--r--lldb/include/lldb/Target/ABI.h8
-rw-r--r--lldb/include/lldb/Target/CPPLanguageRuntime.h20
-rw-r--r--lldb/include/lldb/Target/DynamicLoader.h8
-rw-r--r--lldb/include/lldb/Target/LanguageRuntime.h8
-rw-r--r--lldb/include/lldb/Target/OperatingSystem.h6
-rw-r--r--lldb/include/lldb/Target/Platform.h62
-rw-r--r--lldb/include/lldb/Target/Process.h64
-rw-r--r--lldb/include/lldb/Target/StackFrame.h22
-rw-r--r--lldb/include/lldb/Target/SystemRuntime.h6
-rw-r--r--lldb/include/lldb/Target/TargetList.h8
-rw-r--r--lldb/include/lldb/Target/Thread.h40
-rw-r--r--lldb/include/lldb/Target/ThreadList.h10
-rw-r--r--lldb/include/lldb/Target/UnwindAssembly.h7
-rw-r--r--lldb/include/lldb/Utility/JSON.h54
-rw-r--r--lldb/include/lldb/Utility/SharedCluster.h6
-rw-r--r--lldb/include/lldb/Utility/SharingPtr.h13
16 files changed, 164 insertions, 178 deletions
diff --git a/lldb/include/lldb/Target/ABI.h b/lldb/include/lldb/Target/ABI.h
index 12f60f65726..94826d17350 100644
--- a/lldb/include/lldb/Target/ABI.h
+++ b/lldb/include/lldb/Target/ABI.h
@@ -44,8 +44,7 @@ public:
std::unique_ptr<uint8_t[]> data_ap; /* host data pointer */
};
- virtual
- ~ABI();
+ ~ABI() override;
virtual size_t
GetRedZoneSize () const = 0;
@@ -148,14 +147,17 @@ public:
FindPlugin (const ArchSpec &arch);
protected:
+
//------------------------------------------------------------------
// Classes that inherit from ABI can see and modify these
//------------------------------------------------------------------
ABI();
+
private:
+
DISALLOW_COPY_AND_ASSIGN (ABI);
};
} // namespace lldb_private
-#endif // liblldb_ABI_h_
+#endif // liblldb_ABI_h_
diff --git a/lldb/include/lldb/Target/CPPLanguageRuntime.h b/lldb/include/lldb/Target/CPPLanguageRuntime.h
index 3e51453566b..3299f919140 100644
--- a/lldb/include/lldb/Target/CPPLanguageRuntime.h
+++ b/lldb/include/lldb/Target/CPPLanguageRuntime.h
@@ -114,11 +114,10 @@ public:
bool m_parse_error;
};
- virtual
- ~CPPLanguageRuntime();
+ ~CPPLanguageRuntime() override;
- virtual lldb::LanguageType
- GetLanguageType () const
+ lldb::LanguageType
+ GetLanguageType() const override
{
return lldb::eLanguageTypeC_plus_plus;
}
@@ -126,11 +125,11 @@ public:
virtual bool
IsVTableName (const char *name) = 0;
- virtual bool
- GetObjectDescription (Stream &str, ValueObject &object);
+ bool
+ GetObjectDescription(Stream &str, ValueObject &object) override;
- virtual bool
- GetObjectDescription (Stream &str, Value &value, ExecutionContextScope *exe_scope);
+ bool
+ GetObjectDescription(Stream &str, Value &value, ExecutionContextScope *exe_scope) override;
static bool
IsCPPMangledName(const char *name);
@@ -157,14 +156,17 @@ public:
GetAlternateManglings(const ConstString &mangled, std::vector<ConstString> &alternates) = 0;
protected:
+
//------------------------------------------------------------------
// Classes that inherit from CPPLanguageRuntime can see and modify these
//------------------------------------------------------------------
CPPLanguageRuntime(Process *process);
+
private:
+
DISALLOW_COPY_AND_ASSIGN (CPPLanguageRuntime);
};
} // namespace lldb_private
-#endif // liblldb_CPPLanguageRuntime_h_
+#endif // liblldb_CPPLanguageRuntime_h_
diff --git a/lldb/include/lldb/Target/DynamicLoader.h b/lldb/include/lldb/Target/DynamicLoader.h
index 6652a5ec144..fc476a9dc9d 100644
--- a/lldb/include/lldb/Target/DynamicLoader.h
+++ b/lldb/include/lldb/Target/DynamicLoader.h
@@ -71,8 +71,7 @@ public:
/// The destructor is virtual since this class is designed to be
/// inherited from by the plug-in instance.
//------------------------------------------------------------------
- virtual
- ~DynamicLoader ();
+ ~DynamicLoader() override;
//------------------------------------------------------------------
/// Called after attaching a process.
@@ -303,11 +302,12 @@ protected:
// Member variables.
//------------------------------------------------------------------
Process* m_process; ///< The process that this dynamic loader plug-in is tracking.
+
private:
- DISALLOW_COPY_AND_ASSIGN (DynamicLoader);
+ DISALLOW_COPY_AND_ASSIGN (DynamicLoader);
};
} // namespace lldb_private
-#endif // liblldb_DynamicLoader_h_
+#endif // liblldb_DynamicLoader_h_
diff --git a/lldb/include/lldb/Target/LanguageRuntime.h b/lldb/include/lldb/Target/LanguageRuntime.h
index 4a91267cb19..89a5eaec2fe 100644
--- a/lldb/include/lldb/Target/LanguageRuntime.h
+++ b/lldb/include/lldb/Target/LanguageRuntime.h
@@ -29,8 +29,8 @@ class LanguageRuntime :
public PluginInterface
{
public:
- virtual
- ~LanguageRuntime();
+
+ ~LanguageRuntime() override;
static LanguageRuntime*
FindPlugin (Process *process, lldb::LanguageType language);
@@ -142,7 +142,6 @@ public:
virtual void
ModulesDidLoad (const ModuleList &module_list)
{
- return;
}
protected:
@@ -153,9 +152,10 @@ protected:
LanguageRuntime(Process *process);
Process *m_process;
private:
+
DISALLOW_COPY_AND_ASSIGN (LanguageRuntime);
};
} // namespace lldb_private
-#endif // liblldb_LanguageRuntime_h_
+#endif // liblldb_LanguageRuntime_h_
diff --git a/lldb/include/lldb/Target/OperatingSystem.h b/lldb/include/lldb/Target/OperatingSystem.h
index f1c0eb06026..74de5645da5 100644
--- a/lldb/include/lldb/Target/OperatingSystem.h
+++ b/lldb/include/lldb/Target/OperatingSystem.h
@@ -32,7 +32,6 @@ namespace lldb_private {
class OperatingSystem :
public PluginInterface
-
{
public:
//------------------------------------------------------------------
@@ -58,8 +57,7 @@ public:
//------------------------------------------------------------------
OperatingSystem (Process *process);
- virtual
- ~OperatingSystem();
+ ~OperatingSystem() override;
//------------------------------------------------------------------
// Plug-in Methods
@@ -98,4 +96,4 @@ private:
} // namespace lldb_private
-#endif // #ifndef liblldb_OperatingSystem_h_
+#endif // liblldb_OperatingSystem_h_
diff --git a/lldb/include/lldb/Target/Platform.h b/lldb/include/lldb/Target/Platform.h
index 0dba26a86a7..5fe349fdacf 100644
--- a/lldb/include/lldb/Target/Platform.h
+++ b/lldb/include/lldb/Target/Platform.h
@@ -141,8 +141,7 @@ class ModuleCache;
/// The destructor is virtual since this class is designed to be
/// inherited from by the plug-in instance.
//------------------------------------------------------------------
- virtual
- ~Platform();
+ ~Platform() override;
//------------------------------------------------------------------
/// Find a platform plugin for a given process.
@@ -1224,22 +1223,21 @@ class ModuleCache;
public:
OptionGroupPlatformRSync ();
- virtual
- ~OptionGroupPlatformRSync ();
+ ~OptionGroupPlatformRSync() override;
- virtual lldb_private::Error
- SetOptionValue (CommandInterpreter &interpreter,
- uint32_t option_idx,
- const char *option_value);
+ lldb_private::Error
+ SetOptionValue(CommandInterpreter &interpreter,
+ uint32_t option_idx,
+ const char *option_value) override;
void
- OptionParsingStarting (CommandInterpreter &interpreter);
+ OptionParsingStarting(CommandInterpreter &interpreter) override;
const lldb_private::OptionDefinition*
- GetDefinitions ();
+ GetDefinitions() override;
- virtual uint32_t
- GetNumDefinitions ();
+ uint32_t
+ GetNumDefinitions() override;
// Options table: Required for subclasses of Options.
@@ -1260,22 +1258,21 @@ class ModuleCache;
public:
OptionGroupPlatformSSH ();
- virtual
- ~OptionGroupPlatformSSH ();
+ ~OptionGroupPlatformSSH() override;
- virtual lldb_private::Error
- SetOptionValue (CommandInterpreter &interpreter,
- uint32_t option_idx,
- const char *option_value);
+ lldb_private::Error
+ SetOptionValue(CommandInterpreter &interpreter,
+ uint32_t option_idx,
+ const char *option_value) override;
void
- OptionParsingStarting (CommandInterpreter &interpreter);
+ OptionParsingStarting(CommandInterpreter &interpreter) override;
- virtual uint32_t
- GetNumDefinitions ();
+ uint32_t
+ GetNumDefinitions() override;
const lldb_private::OptionDefinition*
- GetDefinitions ();
+ GetDefinitions() override;
// Options table: Required for subclasses of Options.
@@ -1296,22 +1293,21 @@ class ModuleCache;
public:
OptionGroupPlatformCaching ();
- virtual
- ~OptionGroupPlatformCaching ();
+ ~OptionGroupPlatformCaching() override;
- virtual lldb_private::Error
- SetOptionValue (CommandInterpreter &interpreter,
- uint32_t option_idx,
- const char *option_value);
+ lldb_private::Error
+ SetOptionValue(CommandInterpreter &interpreter,
+ uint32_t option_idx,
+ const char *option_value) override;
void
- OptionParsingStarting (CommandInterpreter &interpreter);
+ OptionParsingStarting(CommandInterpreter &interpreter) override;
- virtual uint32_t
- GetNumDefinitions ();
+ uint32_t
+ GetNumDefinitions() override;
const lldb_private::OptionDefinition*
- GetDefinitions ();
+ GetDefinitions() override;
// Options table: Required for subclasses of Options.
@@ -1326,4 +1322,4 @@ class ModuleCache;
} // namespace lldb_private
-#endif // liblldb_Platform_h_
+#endif // liblldb_Platform_h_
diff --git a/lldb/include/lldb/Target/Process.h b/lldb/include/lldb/Target/Process.h
index 4847f678ef2..65b29b9b3c9 100644
--- a/lldb/include/lldb/Target/Process.h
+++ b/lldb/include/lldb/Target/Process.h
@@ -59,8 +59,7 @@ public:
// Pass NULL for "process" if the ProcessProperties are to be the global copy
ProcessProperties (lldb_private::Process *process);
- virtual
- ~ProcessProperties();
+ ~ProcessProperties() override;
bool
GetDisableMemoryCache() const;
@@ -414,22 +413,22 @@ public:
OptionParsingStarting ();
}
- ~ProcessLaunchCommandOptions ()
+ ~ProcessLaunchCommandOptions() override
{
}
Error
- SetOptionValue (uint32_t option_idx, const char *option_arg);
+ SetOptionValue (uint32_t option_idx, const char *option_arg) override;
void
- OptionParsingStarting ()
+ OptionParsingStarting() override
{
launch_info.Clear();
disable_aslr = eLazyBoolCalculate;
}
const OptionDefinition*
- GetDefinitions ()
+ GetDefinitions() override
{
return g_option_table;
}
@@ -793,7 +792,7 @@ public:
static ConstString &GetStaticBroadcasterClass ();
- virtual ConstString &GetBroadcasterClass() const
+ ConstString &GetBroadcasterClass() const override
{
return GetStaticBroadcasterClass();
}
@@ -823,13 +822,13 @@ public:
ProcessEventData ();
ProcessEventData (const lldb::ProcessSP &process, lldb::StateType state);
- virtual ~ProcessEventData();
+ ~ProcessEventData() override;
static const ConstString &
GetFlavorString ();
- virtual const ConstString &
- GetFlavor () const;
+ const ConstString &
+ GetFlavor() const override;
lldb::ProcessSP
GetProcessSP() const
@@ -869,11 +868,11 @@ public:
return m_interrupted;
}
- virtual void
- Dump (Stream *s) const;
+ void
+ Dump(Stream *s) const override;
- virtual void
- DoOnRemoval (Event *event_ptr);
+ void
+ DoOnRemoval(Event *event_ptr) override;
static const Process::ProcessEventData *
GetEventDataFromEvent (const Event *event_ptr);
@@ -970,8 +969,7 @@ public:
/// The destructor is virtual since this class is designed to be
/// inherited from by the plug-in instance.
//------------------------------------------------------------------
- virtual
- ~Process();
+ ~Process() override;
//------------------------------------------------------------------
/// Find a Process plug-in that can debug \a module using the
@@ -3081,29 +3079,29 @@ public:
//------------------------------------------------------------------
// lldb::ExecutionContextScope pure virtual functions
//------------------------------------------------------------------
- virtual lldb::TargetSP
- CalculateTarget ();
+ lldb::TargetSP
+ CalculateTarget() override;
- virtual lldb::ProcessSP
- CalculateProcess ()
+ lldb::ProcessSP
+ CalculateProcess() override
{
return shared_from_this();
}
- virtual lldb::ThreadSP
- CalculateThread ()
+ lldb::ThreadSP
+ CalculateThread() override
{
return lldb::ThreadSP();
}
- virtual lldb::StackFrameSP
- CalculateStackFrame ()
+ lldb::StackFrameSP
+ CalculateStackFrame() override
{
return lldb::StackFrameSP();
}
- virtual void
- CalculateExecutionContext (ExecutionContext &exe_ctx);
+ void
+ CalculateExecutionContext(ExecutionContext &exe_ctx) override;
void
SetSTDIOFileDescriptor (int file_descriptor);
@@ -3265,14 +3263,14 @@ protected:
public:
AttachCompletionHandler (Process *process, uint32_t exec_count);
- virtual
- ~AttachCompletionHandler()
+ ~AttachCompletionHandler() override
{
}
- virtual EventActionResult PerformAction (lldb::EventSP &event_sp);
- virtual EventActionResult HandleBeingInterrupted ();
- virtual const char *GetExitString();
+ EventActionResult PerformAction(lldb::EventSP &event_sp) override;
+ EventActionResult HandleBeingInterrupted() override;
+ const char *GetExitString() override;
+
private:
uint32_t m_exec_count;
std::string m_exit_string;
@@ -3489,15 +3487,15 @@ protected:
void
LoadOperatingSystemPlugin(bool flush);
private:
+
//------------------------------------------------------------------
// For Process only
//------------------------------------------------------------------
void ControlPrivateStateThread (uint32_t signal);
DISALLOW_COPY_AND_ASSIGN (Process);
-
};
} // namespace lldb_private
-#endif // liblldb_Process_h_
+#endif // liblldb_Process_h_
diff --git a/lldb/include/lldb/Target/StackFrame.h b/lldb/include/lldb/Target/StackFrame.h
index 95e21445be0..85dbf06b925 100644
--- a/lldb/include/lldb/Target/StackFrame.h
+++ b/lldb/include/lldb/Target/StackFrame.h
@@ -135,7 +135,7 @@ public:
const Address& pc,
const SymbolContext *sc_ptr);
- virtual ~StackFrame ();
+ ~StackFrame() override;
lldb::ThreadSP
GetThread () const
@@ -468,20 +468,20 @@ public:
//------------------------------------------------------------------
// lldb::ExecutionContextScope pure virtual functions
//------------------------------------------------------------------
- virtual lldb::TargetSP
- CalculateTarget ();
+ lldb::TargetSP
+ CalculateTarget() override;
- virtual lldb::ProcessSP
- CalculateProcess ();
+ lldb::ProcessSP
+ CalculateProcess() override;
- virtual lldb::ThreadSP
- CalculateThread ();
+ lldb::ThreadSP
+ CalculateThread() override;
- virtual lldb::StackFrameSP
- CalculateStackFrame ();
+ lldb::StackFrameSP
+ CalculateStackFrame() override;
void
- CalculateExecutionContext (ExecutionContext &exe_ctx);
+ CalculateExecutionContext(ExecutionContext &exe_ctx) override;
protected:
friend class StackFrameList;
@@ -525,4 +525,4 @@ private:
} // namespace lldb_private
-#endif // liblldb_StackFrame_h_
+#endif // liblldb_StackFrame_h_
diff --git a/lldb/include/lldb/Target/SystemRuntime.h b/lldb/include/lldb/Target/SystemRuntime.h
index 18f38f79bdb..54fde88c8d1 100644
--- a/lldb/include/lldb/Target/SystemRuntime.h
+++ b/lldb/include/lldb/Target/SystemRuntime.h
@@ -75,8 +75,7 @@ public:
/// The destructor is virtual since this class is designed to be
/// inherited by the plug-in instance.
//------------------------------------------------------------------
- virtual
- ~SystemRuntime();
+ ~SystemRuntime() override;
//------------------------------------------------------------------
/// Called after attaching to a process.
@@ -354,9 +353,10 @@ protected:
std::vector<ConstString> m_types;
private:
+
DISALLOW_COPY_AND_ASSIGN (SystemRuntime);
};
} // namespace lldb_private
-#endif // liblldb_SystemRuntime_h_
+#endif // liblldb_SystemRuntime_h_
diff --git a/lldb/include/lldb/Target/TargetList.h b/lldb/include/lldb/Target/TargetList.h
index 27e46ba81a7..1d5cadea016 100644
--- a/lldb/include/lldb/Target/TargetList.h
+++ b/lldb/include/lldb/Target/TargetList.h
@@ -51,12 +51,12 @@ public:
static ConstString &GetStaticBroadcasterClass ();
- virtual ConstString &GetBroadcasterClass() const
+ ConstString &GetBroadcasterClass() const override
{
return GetStaticBroadcasterClass();
}
- virtual ~TargetList();
+ ~TargetList() override;
//------------------------------------------------------------------
/// Create a new Target.
@@ -230,7 +230,9 @@ protected:
lldb::TargetSP m_dummy_target_sp;
mutable Mutex m_target_list_mutex;
uint32_t m_selected_target_idx;
+
private:
+
lldb::TargetSP
GetDummyTarget (lldb_private::Debugger &debugger);
@@ -262,4 +264,4 @@ private:
} // namespace lldb_private
-#endif // liblldb_TargetList_h_
+#endif // liblldb_TargetList_h_
diff --git a/lldb/include/lldb/Target/Thread.h b/lldb/include/lldb/Target/Thread.h
index 1b20b83eda1..af11837b966 100644
--- a/lldb/include/lldb/Target/Thread.h
+++ b/lldb/include/lldb/Target/Thread.h
@@ -30,8 +30,7 @@ class ThreadProperties : public Properties
public:
ThreadProperties(bool is_global);
- virtual
- ~ThreadProperties();
+ ~ThreadProperties() override;
//------------------------------------------------------------------
/// The regular expression returned determines symbols that this
@@ -82,7 +81,7 @@ public:
static ConstString &GetStaticBroadcasterClass ();
- virtual ConstString &GetBroadcasterClass() const
+ ConstString &GetBroadcasterClass() const override
{
return GetStaticBroadcasterClass();
}
@@ -97,19 +96,19 @@ public:
ThreadEventData();
- virtual ~ThreadEventData();
+ ~ThreadEventData() override;
static const ConstString &
GetFlavorString ();
- virtual const ConstString &
- GetFlavor () const
+ const ConstString &
+ GetFlavor() const override
{
return ThreadEventData::GetFlavorString ();
}
- virtual void
- Dump (Stream *s) const;
+ void
+ Dump(Stream *s) const override;
static const ThreadEventData *
GetEventDataFromEvent (const Event *event_ptr);
@@ -179,7 +178,7 @@ public:
//------------------------------------------------------------------
Thread (Process &process, lldb::tid_t tid, bool use_invalid_index_id = false);
- virtual ~Thread();
+ ~Thread() override;
lldb::ProcessSP
GetProcess() const
@@ -1146,20 +1145,20 @@ public:
//------------------------------------------------------------------
// lldb::ExecutionContextScope pure virtual functions
//------------------------------------------------------------------
- virtual lldb::TargetSP
- CalculateTarget ();
+ lldb::TargetSP
+ CalculateTarget() override;
- virtual lldb::ProcessSP
- CalculateProcess ();
+ lldb::ProcessSP
+ CalculateProcess() override;
- virtual lldb::ThreadSP
- CalculateThread ();
+ lldb::ThreadSP
+ CalculateThread() override;
- virtual lldb::StackFrameSP
- CalculateStackFrame ();
+ lldb::StackFrameSP
+ CalculateStackFrame() override;
- virtual void
- CalculateExecutionContext (ExecutionContext &exe_ctx);
+ void
+ CalculateExecutionContext(ExecutionContext &exe_ctx) override;
lldb::StackFrameSP
GetStackFrameSPForStackFramePtr (StackFrame *stack_frame_ptr);
@@ -1360,9 +1359,8 @@ private:
//------------------------------------------------------------------
DISALLOW_COPY_AND_ASSIGN (Thread);
-
};
} // namespace lldb_private
-#endif // liblldb_Thread_h_
+#endif // liblldb_Thread_h_
diff --git a/lldb/include/lldb/Target/ThreadList.h b/lldb/include/lldb/Target/ThreadList.h
index 12c430c9c8d..e6489b25e55 100644
--- a/lldb/include/lldb/Target/ThreadList.h
+++ b/lldb/include/lldb/Target/ThreadList.h
@@ -32,8 +32,7 @@ public:
ThreadList (const ThreadList &rhs);
- virtual
- ~ThreadList ();
+ ~ThreadList() override;
const ThreadList&
operator = (const ThreadList& rhs);
@@ -128,8 +127,8 @@ public:
void
SetStopID (uint32_t stop_id);
- virtual Mutex &
- GetMutex ();
+ Mutex &
+ GetMutex() override;
void
Update (ThreadList &rhs);
@@ -150,9 +149,10 @@ protected:
lldb::tid_t m_selected_tid; ///< For targets that need the notion of a current thread.
private:
+
ThreadList ();
};
} // namespace lldb_private
-#endif // liblldb_ThreadList_h_
+#endif // liblldb_ThreadList_h_
diff --git a/lldb/include/lldb/Target/UnwindAssembly.h b/lldb/include/lldb/Target/UnwindAssembly.h
index 963949cf07d..6f53e7e710f 100644
--- a/lldb/include/lldb/Target/UnwindAssembly.h
+++ b/lldb/include/lldb/Target/UnwindAssembly.h
@@ -24,8 +24,7 @@ public:
static lldb::UnwindAssemblySP
FindPlugin (const ArchSpec &arch);
- virtual
- ~UnwindAssembly();
+ ~UnwindAssembly() override;
virtual bool
GetNonCallSiteUnwindPlanFromAssembly (AddressRange& func,
@@ -59,6 +58,4 @@ private:
} // namespace lldb_private
-#endif //utility_UnwindAssembly_h_
-
-
+#endif // utility_UnwindAssembly_h_
diff --git a/lldb/include/lldb/Utility/JSON.h b/lldb/include/lldb/Utility/JSON.h
index da5e26dbda2..e14e72a55fb 100644
--- a/lldb/include/lldb/Utility/JSON.h
+++ b/lldb/include/lldb/Utility/JSON.h
@@ -71,8 +71,8 @@ namespace lldb_private {
JSONString&
operator = (const JSONString& s) = delete;
- virtual void
- Write (Stream& s);
+ void
+ Write(Stream& s) override;
typedef std::shared_ptr<JSONString> SP;
@@ -84,8 +84,7 @@ namespace lldb_private {
return V->GetKind() == JSONValue::Kind::String;
}
- virtual
- ~JSONString () = default;
+ ~JSONString() override = default;
private:
@@ -106,8 +105,8 @@ namespace lldb_private {
JSONNumber&
operator = (const JSONNumber& s) = delete;
- virtual void
- Write (Stream& s);
+ void
+ Write(Stream& s) override;
typedef std::shared_ptr<JSONNumber> SP;
@@ -128,8 +127,7 @@ namespace lldb_private {
return V->GetKind() == JSONValue::Kind::Number;
}
- virtual
- ~JSONNumber () = default;
+ ~JSONNumber() override = default;
private:
bool m_is_integer;
@@ -146,8 +144,8 @@ namespace lldb_private {
JSONTrue&
operator = (const JSONTrue& s) = delete;
- virtual void
- Write (Stream& s);
+ void
+ Write(Stream& s) override;
typedef std::shared_ptr<JSONTrue> SP;
@@ -156,8 +154,7 @@ namespace lldb_private {
return V->GetKind() == JSONValue::Kind::True;
}
- virtual
- ~JSONTrue () = default;
+ ~JSONTrue() override = default;
};
class JSONFalse : public JSONValue
@@ -169,8 +166,8 @@ namespace lldb_private {
JSONFalse&
operator = (const JSONFalse& s) = delete;
- virtual void
- Write (Stream& s);
+ void
+ Write(Stream& s) override;
typedef std::shared_ptr<JSONFalse> SP;
@@ -179,8 +176,7 @@ namespace lldb_private {
return V->GetKind() == JSONValue::Kind::False;
}
- virtual
- ~JSONFalse () = default;
+ ~JSONFalse() override = default;
};
class JSONNull : public JSONValue
@@ -192,8 +188,8 @@ namespace lldb_private {
JSONNull&
operator = (const JSONNull& s) = delete;
- virtual void
- Write (Stream& s);
+ void
+ Write(Stream& s) override;
typedef std::shared_ptr<JSONNull> SP;
@@ -202,8 +198,7 @@ namespace lldb_private {
return V->GetKind() == JSONValue::Kind::Null;
}
- virtual
- ~JSONNull () = default;
+ ~JSONNull() override = default;
};
class JSONObject : public JSONValue
@@ -215,8 +210,8 @@ namespace lldb_private {
JSONObject&
operator = (const JSONObject& s) = delete;
- virtual void
- Write (Stream& s);
+ void
+ Write(Stream& s) override;
typedef std::shared_ptr<JSONObject> SP;
@@ -232,8 +227,7 @@ namespace lldb_private {
JSONValue::SP
GetObject (const std::string& key);
- virtual
- ~JSONObject () = default;
+ ~JSONObject() override = default;
private:
typedef std::map<std::string, JSONValue::SP> Map;
@@ -250,8 +244,8 @@ namespace lldb_private {
JSONArray&
operator = (const JSONArray& s) = delete;
- virtual void
- Write (Stream& s);
+ void
+ Write(Stream& s) override;
typedef std::shared_ptr<JSONArray> SP;
@@ -280,13 +274,11 @@ namespace lldb_private {
Size
GetNumElements ();
- virtual
- ~JSONArray () = default;
+ ~JSONArray() override = default;
Vector m_elements;
};
-
class JSONParser : public StringExtractor
{
public:
@@ -327,6 +319,6 @@ namespace lldb_private {
JSONValue::SP
ParseJSONArray ();
};
-}
+} // namespace lldb_private
-#endif // utility_ProcessStructReader_h_
+#endif // utility_JSON_h_
diff --git a/lldb/include/lldb/Utility/SharedCluster.h b/lldb/include/lldb/Utility/SharedCluster.h
index 3a34d8ddb41..2c03c409d97 100644
--- a/lldb/include/lldb/Utility/SharedCluster.h
+++ b/lldb/include/lldb/Utility/SharedCluster.h
@@ -27,14 +27,15 @@ namespace imp
shared_ptr_refcount() : shared_count (0) {}
- virtual ~shared_ptr_refcount ()
+ ~shared_ptr_refcount() override
{
}
- virtual void on_zero_shared ()
+ void on_zero_shared() override
{
manager->DecrementRefCount();
}
+
private:
T *manager;
};
@@ -100,4 +101,5 @@ private:
};
} // namespace lldb_private
+
#endif // utility_SharedCluster_h_
diff --git a/lldb/include/lldb/Utility/SharingPtr.h b/lldb/include/lldb/Utility/SharingPtr.h
index 5c77dad9f7f..96f4f2b8f09 100644
--- a/lldb/include/lldb/Utility/SharingPtr.h
+++ b/lldb/include/lldb/Utility/SharingPtr.h
@@ -67,7 +67,7 @@ public:
: data_(p) {}
private:
- virtual void on_zero_shared();
+ void on_zero_shared() override;
// Outlaw copy constructor and assignment operator to keep effective C++
// warnings down to a minimum
@@ -113,7 +113,8 @@ public:
: data_(a0, a1, a2, a3, a4) {}
private:
- virtual void on_zero_shared();
+ void on_zero_shared() override;
+
public:
T* get() {return &data_;}
};
@@ -638,13 +639,11 @@ public:
{
}
- virtual
- ~ReferenceCountedBaseVirtual ()
+ ~ReferenceCountedBaseVirtual() override
{
}
- virtual void on_zero_shared ();
-
+ void on_zero_shared() override;
};
template <class T>
@@ -838,4 +837,4 @@ inline bool operator!= (T* lhs, const IntrusiveSharingPtr<U>& rhs)
} // namespace lldb_private
-#endif // utility_SharingPtr_h_
+#endif // utility_SharingPtr_h_
OpenPOWER on IntegriCloud