[Lldb-commits] [lldb] r251054 - Fix Clang-tidy modernize-use-override warnings in some files in include/lldb/Interpreter and Host; other minor fixes.
Eugene Zelenko via lldb-commits
lldb-commits at lists.llvm.org
Thu Oct 22 12:59:22 PDT 2015
Author: eugenezelenko
Date: Thu Oct 22 14:59:21 2015
New Revision: 251054
URL: http://llvm.org/viewvc/llvm-project?rev=251054&view=rev
Log:
Fix Clang-tidy modernize-use-override warnings in some files in include/lldb/Interpreter and Host; other minor fixes.
Differential Revision: http://reviews.llvm.org/D13602
Modified:
lldb/trunk/include/lldb/Host/MonitoringProcessLauncher.h
lldb/trunk/include/lldb/Host/posix/HostProcessPosix.h
lldb/trunk/include/lldb/Interpreter/CommandCompletions.h
lldb/trunk/include/lldb/Interpreter/CommandHistory.h
lldb/trunk/include/lldb/Interpreter/CommandInterpreter.h
lldb/trunk/include/lldb/Interpreter/CommandObject.h
lldb/trunk/include/lldb/Interpreter/CommandObjectMultiword.h
lldb/trunk/include/lldb/Interpreter/CommandObjectRegexCommand.h
lldb/trunk/include/lldb/Interpreter/CommandOptionValidators.h
lldb/trunk/include/lldb/Interpreter/OptionGroupArchitecture.h
lldb/trunk/include/lldb/Interpreter/OptionGroupBoolean.h
lldb/trunk/include/lldb/Interpreter/OptionGroupFile.h
lldb/trunk/include/lldb/Interpreter/OptionGroupFormat.h
lldb/trunk/include/lldb/Interpreter/OptionGroupOutputFile.h
lldb/trunk/include/lldb/Interpreter/OptionGroupPlatform.h
lldb/trunk/include/lldb/Interpreter/OptionGroupString.h
lldb/trunk/include/lldb/Interpreter/OptionGroupUInt64.h
lldb/trunk/include/lldb/Interpreter/OptionGroupUUID.h
lldb/trunk/include/lldb/Interpreter/OptionGroupValueObjectDisplay.h
lldb/trunk/include/lldb/Interpreter/OptionGroupVariable.h
lldb/trunk/include/lldb/Interpreter/OptionGroupWatchpoint.h
lldb/trunk/include/lldb/Interpreter/Options.h
lldb/trunk/include/lldb/Interpreter/ScriptInterpreter.h
Modified: lldb/trunk/include/lldb/Host/MonitoringProcessLauncher.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Host/MonitoringProcessLauncher.h?rev=251054&r1=251053&r2=251054&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Host/MonitoringProcessLauncher.h (original)
+++ lldb/trunk/include/lldb/Host/MonitoringProcessLauncher.h Thu Oct 22 14:59:21 2015
@@ -10,6 +10,10 @@
#ifndef lldb_Host_MonitoringProcessLauncher_h_
#define lldb_Host_MonitoringProcessLauncher_h_
+// C Includes
+// C++ Includes
+// Other libraries and framework includes
+// Project includes
#include "lldb/Host/ProcessLauncher.h"
namespace lldb_private
@@ -20,11 +24,12 @@ class MonitoringProcessLauncher : public
public:
explicit MonitoringProcessLauncher(std::unique_ptr<ProcessLauncher> delegate_launcher);
- virtual HostProcess LaunchProcess(const ProcessLaunchInfo &launch_info, Error &error);
+ HostProcess LaunchProcess(const ProcessLaunchInfo &launch_info, Error &error) override;
private:
std::unique_ptr<ProcessLauncher> m_delegate_launcher;
};
-}
-#endif
+} // namespace lldb_private
+
+#endif // lldb_Host_MonitoringProcessLauncher_h_
Modified: lldb/trunk/include/lldb/Host/posix/HostProcessPosix.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Host/posix/HostProcessPosix.h?rev=251054&r1=251053&r2=251054&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Host/posix/HostProcessPosix.h (original)
+++ lldb/trunk/include/lldb/Host/posix/HostProcessPosix.h Thu Oct 22 14:59:21 2015
@@ -10,6 +10,10 @@
#ifndef lldb_Host_HostProcesPosix_h_
#define lldb_Host_HostProcesPosix_h_
+// C Includes
+// C++ Includes
+// Other libraries and framework includes
+// Project includes
#include "lldb/lldb-types.h"
#include "lldb/Core/Error.h"
#include "lldb/Host/HostNativeProcessBase.h"
@@ -24,7 +28,7 @@ class HostProcessPosix : public HostNati
public:
HostProcessPosix();
HostProcessPosix(lldb::process_t process);
- virtual ~HostProcessPosix();
+ ~HostProcessPosix() override;
virtual Error Signal(int signo) const;
static Error Signal(lldb::process_t process, int signo);
@@ -37,6 +41,7 @@ class HostProcessPosix : public HostNati
HostThread StartMonitoring(HostProcess::MonitorCallback callback, void *callback_baton, bool monitor_signals) override;
};
-}
-#endif
+} // namespace lldb_private
+
+#endif // lldb_Host_HostProcesPosix_h_
Modified: lldb/trunk/include/lldb/Interpreter/CommandCompletions.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Interpreter/CommandCompletions.h?rev=251054&r1=251053&r2=251054&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Interpreter/CommandCompletions.h (original)
+++ lldb/trunk/include/lldb/Interpreter/CommandCompletions.h Thu Oct 22 14:59:21 2015
@@ -54,7 +54,6 @@ public:
// so you can add custom enums starting from here in your Option class.
// Also if you & in this bit the base code will not process the option.
eCustomCompletion = (1u << 9)
-
} CommonCompletionTypes;
struct CommonCompletionElement
@@ -83,6 +82,7 @@ public:
SearchFilter *searcher,
bool &word_complete,
StringList &matches);
+
static int
DiskDirectories (CommandInterpreter &interpreter,
const char *partial_file_name,
@@ -170,16 +170,16 @@ public:
int max_return_elements,
StringList &matches);
- virtual ~Completer ();
+ ~Completer() override;
- virtual CallbackReturn
- SearchCallback (SearchFilter &filter,
- SymbolContext &context,
- Address *addr,
- bool complete) = 0;
+ CallbackReturn
+ SearchCallback(SearchFilter &filter,
+ SymbolContext &context,
+ Address *addr,
+ bool complete) override = 0;
- virtual Depth
- GetDepth () = 0;
+ Depth
+ GetDepth() override = 0;
virtual size_t
DoCompletion (SearchFilter *filter) = 0;
@@ -190,8 +190,9 @@ public:
int m_match_start_point;
int m_max_return_elements;
StringList &m_matches;
+
private:
- DISALLOW_COPY_AND_ASSIGN (Completer);
+ DISALLOW_COPY_AND_ASSIGN(Completer);
};
//----------------------------------------------------------------------
@@ -200,7 +201,6 @@ public:
class SourceFileCompleter : public Completer
{
public:
-
SourceFileCompleter (CommandInterpreter &interpreter,
bool include_support_files,
const char *completion_str,
@@ -208,24 +208,24 @@ public:
int max_return_elements,
StringList &matches);
- virtual Searcher::Depth GetDepth ();
+ Searcher::Depth GetDepth() override;
- virtual Searcher::CallbackReturn
- SearchCallback (SearchFilter &filter,
- SymbolContext &context,
- Address *addr,
- bool complete);
+ Searcher::CallbackReturn
+ SearchCallback(SearchFilter &filter,
+ SymbolContext &context,
+ Address *addr,
+ bool complete) override;
size_t
- DoCompletion (SearchFilter *filter);
+ DoCompletion(SearchFilter *filter) override;
private:
bool m_include_support_files;
FileSpecList m_matching_files;
const char *m_file_name;
const char *m_dir_name;
- DISALLOW_COPY_AND_ASSIGN (SourceFileCompleter);
+ DISALLOW_COPY_AND_ASSIGN(SourceFileCompleter);
};
//----------------------------------------------------------------------
@@ -234,29 +234,28 @@ public:
class ModuleCompleter : public Completer
{
public:
-
ModuleCompleter (CommandInterpreter &interpreter,
const char *completion_str,
int match_start_point,
int max_return_elements,
StringList &matches);
- virtual Searcher::Depth GetDepth ();
+ Searcher::Depth GetDepth() override;
- virtual Searcher::CallbackReturn
- SearchCallback (SearchFilter &filter,
- SymbolContext &context,
- Address *addr,
- bool complete);
+ Searcher::CallbackReturn
+ SearchCallback(SearchFilter &filter,
+ SymbolContext &context,
+ Address *addr,
+ bool complete) override;
size_t
- DoCompletion (SearchFilter *filter);
+ DoCompletion(SearchFilter *filter) override;
private:
const char *m_file_name;
const char *m_dir_name;
- DISALLOW_COPY_AND_ASSIGN (ModuleCompleter);
+ DISALLOW_COPY_AND_ASSIGN(ModuleCompleter);
};
//----------------------------------------------------------------------
@@ -265,23 +264,22 @@ public:
class SymbolCompleter : public Completer
{
public:
-
SymbolCompleter (CommandInterpreter &interpreter,
const char *completion_str,
int match_start_point,
int max_return_elements,
StringList &matches);
- virtual Searcher::Depth GetDepth ();
+ Searcher::Depth GetDepth() override;
- virtual Searcher::CallbackReturn
- SearchCallback (SearchFilter &filter,
- SymbolContext &context,
- Address *addr,
- bool complete);
+ Searcher::CallbackReturn
+ SearchCallback(SearchFilter &filter,
+ SymbolContext &context,
+ Address *addr,
+ bool complete) override;
size_t
- DoCompletion (SearchFilter *filter);
+ DoCompletion(SearchFilter *filter) override;
private:
// struct NameCmp {
@@ -294,14 +292,14 @@ public:
RegularExpression m_regex;
typedef std::set<ConstString> collection;
collection m_match_set;
- DISALLOW_COPY_AND_ASSIGN (SymbolCompleter);
+ DISALLOW_COPY_AND_ASSIGN(SymbolCompleter);
};
private:
static CommonCompletionElement g_common_completions[];
-
};
} // namespace lldb_private
-#endif // lldb_CommandCompletions_h_
+
+#endif // lldb_CommandCompletions_h_
Modified: lldb/trunk/include/lldb/Interpreter/CommandHistory.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Interpreter/CommandHistory.h?rev=251054&r1=251053&r2=251054&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Interpreter/CommandHistory.h (original)
+++ lldb/trunk/include/lldb/Interpreter/CommandHistory.h Thu Oct 22 14:59:21 2015
@@ -17,7 +17,6 @@
// Other libraries and framework includes
// Project includes
-
#include "lldb/lldb-private.h"
#include "lldb/Core/Stream.h"
#include "lldb/Host/Mutex.h"
Modified: lldb/trunk/include/lldb/Interpreter/CommandInterpreter.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Interpreter/CommandInterpreter.h?rev=251054&r1=251053&r2=251054&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Interpreter/CommandInterpreter.h (original)
+++ lldb/trunk/include/lldb/Interpreter/CommandInterpreter.h Thu Oct 22 14:59:21 2015
@@ -200,8 +200,6 @@ class CommandInterpreter :
public IOHandlerDelegate
{
public:
-
-
typedef std::map<std::string, OptionArgVectorSP> OptionArgMap;
enum
@@ -229,11 +227,17 @@ public:
eCommandTypesAllThem = 0xFFFF // all commands
};
+ CommandInterpreter(Debugger &debugger,
+ lldb::ScriptLanguage script_language,
+ bool synchronous_execution);
+
+ ~CommandInterpreter() override;
+
// These two functions fill out the Broadcaster interface:
static ConstString &GetStaticBroadcasterClass ();
- virtual ConstString &GetBroadcasterClass() const
+ ConstString &GetBroadcasterClass() const override
{
return GetStaticBroadcasterClass();
}
@@ -242,13 +246,6 @@ public:
SourceInitFile (bool in_cwd,
CommandReturnObject &result);
- CommandInterpreter (Debugger &debugger,
- lldb::ScriptLanguage script_language,
- bool synchronous_execution);
-
- virtual
- ~CommandInterpreter ();
-
bool
AddCommand (const char *name,
const lldb::CommandObjectSP &cmd_sp,
@@ -306,7 +303,6 @@ public:
OptionArgVectorSP
GetAliasOptions (const char *alias_name);
-
bool
ProcessAliasOptionsArgs (lldb::CommandObjectSP &cmd_obj_sp,
const char *options_args,
@@ -394,7 +390,6 @@ public:
// Otherwise, returns the number of matches.
//
// FIXME: Only max_return_elements == -1 is supported at present.
-
int
HandleCompletion (const char *current_line,
const char *cursor,
@@ -407,7 +402,6 @@ public:
// Help command can call it for the first argument.
// word_complete tells whether the completions are considered a "complete" response (so the
// completer should complete the quote & put a space after the word.
-
int
HandleCompletionMatches (Args &input,
int &cursor_index,
@@ -417,7 +411,6 @@ public:
bool &word_complete,
StringList &matches);
-
int
GetCommandNamesMatchingPartialString (const char *cmd_cstr,
bool include_aliases,
@@ -497,7 +490,6 @@ public:
void
SetScriptLanguage (lldb::ScriptLanguage lang);
-
bool
HasCommands ();
@@ -668,20 +660,20 @@ protected:
//------------------------------------------------------------------
// IOHandlerDelegate functions
//------------------------------------------------------------------
- virtual void
- IOHandlerInputComplete (IOHandler &io_handler,
- std::string &line);
+ void
+ IOHandlerInputComplete(IOHandler &io_handler,
+ std::string &line) override;
- virtual ConstString
- IOHandlerGetControlSequence (char ch)
+ ConstString
+ IOHandlerGetControlSequence(char ch) override
{
if (ch == 'd')
return ConstString("quit\n");
return ConstString();
}
- virtual bool
- IOHandlerInterrupt (IOHandler &io_handler);
+ bool
+ IOHandlerInterrupt(IOHandler &io_handler) override;
size_t
GetProcessOutput ();
@@ -691,10 +683,8 @@ protected:
lldb::CommandObjectSP
GetCommandSP (const char *cmd, bool include_aliases = true, bool exact = true, StringList *matches = NULL);
-
private:
-
Error
PreprocessCommand (std::string &command);
@@ -704,7 +694,6 @@ private:
CommandObject *
ResolveCommandImpl(std::string &command_line, CommandReturnObject &result);
-
Debugger &m_debugger; // The debugger session that this interpreter is associated with
ExecutionContextRef m_exe_ctx_ref; // The current execution context to use when handling commands
bool m_synchronous_execution;
@@ -726,10 +715,8 @@ private:
uint32_t m_num_errors;
bool m_quit_requested;
bool m_stopped_for_crash;
-
};
-
} // namespace lldb_private
-#endif // liblldb_CommandInterpreter_h_
+#endif // liblldb_CommandInterpreter_h_
Modified: lldb/trunk/include/lldb/Interpreter/CommandObject.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Interpreter/CommandObject.h?rev=251054&r1=251053&r2=251054&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Interpreter/CommandObject.h (original)
+++ lldb/trunk/include/lldb/Interpreter/CommandObject.h Thu Oct 22 14:59:21 2015
@@ -10,11 +10,14 @@
#ifndef liblldb_CommandObject_h_
#define liblldb_CommandObject_h_
+// C Includes
+// C++ Includes
#include <map>
-#include <set>
#include <string>
#include <vector>
+// Other libraries and framework includes
+// Project includes
#include "lldb/lldb-private.h"
#include "lldb/Interpreter/Args.h"
#include "lldb/Interpreter/CommandCompletions.h"
@@ -28,7 +31,6 @@ namespace lldb_private {
class CommandObject
{
public:
-
typedef const char *(ArgumentHelpCallbackFunction) ();
struct ArgumentHelpCallback
@@ -46,7 +48,6 @@ public:
{
return (help_callback != NULL);
}
-
};
struct ArgumentTableEntry // Entries in the main argument information table
@@ -85,7 +86,6 @@ public:
virtual
~CommandObject ();
-
static const char *
GetArgumentTypeAsCString (const lldb::CommandArgumentType arg_type);
@@ -326,7 +326,6 @@ public:
/// @return
/// The number of completions.
//------------------------------------------------------------------
-
virtual int
HandleArgumentCompletion (Args &input,
int &cursor_index,
@@ -488,13 +487,11 @@ protected:
// to the specified command argument entry.
static void
AddIDsArgumentData(CommandArgumentEntry &arg, lldb::CommandArgumentType ID, lldb::CommandArgumentType IDRange);
-
};
class CommandObjectParsed : public CommandObject
{
public:
-
CommandObjectParsed (CommandInterpreter &interpreter,
const char *name,
const char *help = NULL,
@@ -502,25 +499,26 @@ public:
uint32_t flags = 0) :
CommandObject (interpreter, name, help, syntax, flags) {}
- virtual
- ~CommandObjectParsed () {}
+ ~CommandObjectParsed() override = default;
- virtual bool
- Execute (const char *args_string, CommandReturnObject &result);
+ bool
+ Execute(const char *args_string, CommandReturnObject &result) override;
protected:
virtual bool
DoExecute (Args& command,
CommandReturnObject &result) = 0;
- virtual bool
- WantsRawCommandString() { return false; }
+ bool
+ WantsRawCommandString() override
+ {
+ return false;
+ }
};
class CommandObjectRaw : public CommandObject
{
public:
-
CommandObjectRaw (CommandInterpreter &interpreter,
const char *name,
const char *help = NULL,
@@ -528,22 +526,22 @@ public:
uint32_t flags = 0) :
CommandObject (interpreter, name, help, syntax, flags) {}
- virtual
- ~CommandObjectRaw () {}
+ ~CommandObjectRaw() override = default;
- virtual bool
- Execute (const char *args_string, CommandReturnObject &result);
+ bool
+ Execute(const char *args_string, CommandReturnObject &result) override;
protected:
virtual bool
DoExecute (const char *command, CommandReturnObject &result) = 0;
- virtual bool
- WantsRawCommandString() { return true; }
+ bool
+ WantsRawCommandString() override
+ {
+ return true;
+ }
};
-
} // namespace lldb_private
-
-#endif // liblldb_CommandObject_h_
+#endif // liblldb_CommandObject_h_
Modified: lldb/trunk/include/lldb/Interpreter/CommandObjectMultiword.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Interpreter/CommandObjectMultiword.h?rev=251054&r1=251053&r2=251054&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Interpreter/CommandObjectMultiword.h (original)
+++ lldb/trunk/include/lldb/Interpreter/CommandObjectMultiword.h Thu Oct 22 14:59:21 2015
@@ -12,8 +12,6 @@
// C Includes
// C++ Includes
-#include <map>
-
// Other libraries and framework includes
// Project includes
#include "lldb/Interpreter/CommandObject.h"
@@ -36,51 +34,60 @@ public:
const char *syntax = NULL,
uint32_t flags = 0);
- virtual
- ~CommandObjectMultiword ();
+ ~CommandObjectMultiword() override;
- virtual bool
- IsMultiwordObject () { return true; }
+ bool
+ IsMultiwordObject() override
+ {
+ return true;
+ }
- virtual bool
- LoadSubCommand (const char *cmd_name,
- const lldb::CommandObjectSP& command_obj);
+ bool
+ LoadSubCommand(const char *cmd_name,
+ const lldb::CommandObjectSP& command_obj) override;
- virtual void
- GenerateHelpText (Stream &output_stream);
+ void
+ GenerateHelpText(Stream &output_stream) override;
- virtual lldb::CommandObjectSP
- GetSubcommandSP (const char *sub_cmd, StringList *matches = NULL);
+ lldb::CommandObjectSP
+ GetSubcommandSP(const char *sub_cmd, StringList *matches = NULL) override;
- virtual CommandObject *
- GetSubcommandObject (const char *sub_cmd, StringList *matches = NULL);
+ CommandObject *
+ GetSubcommandObject(const char *sub_cmd, StringList *matches = NULL) override;
- virtual void
- AproposAllSubCommands (const char *prefix,
- const char *search_word,
- StringList &commands_found,
- StringList &commands_help);
-
- virtual bool
- WantsRawCommandString() { return false; }
-
- virtual int
- HandleCompletion (Args &input,
- int &cursor_index,
- int &cursor_char_position,
- int match_start_point,
- int max_return_elements,
- bool &word_complete,
- StringList &matches);
-
- virtual const char *GetRepeatCommand (Args ¤t_command_args, uint32_t index);
-
- virtual bool
- Execute (const char *args_string,
- CommandReturnObject &result);
+ void
+ AproposAllSubCommands(const char *prefix,
+ const char *search_word,
+ StringList &commands_found,
+ StringList &commands_help) override;
+
+ bool
+ WantsRawCommandString() override
+ {
+ return false;
+ }
+
+ int
+ HandleCompletion(Args &input,
+ int &cursor_index,
+ int &cursor_char_position,
+ int match_start_point,
+ int max_return_elements,
+ bool &word_complete,
+ StringList &matches) override;
+
+ const char *
+ GetRepeatCommand (Args ¤t_command_args, uint32_t index) override;
+
+ bool
+ Execute(const char *args_string,
+ CommandReturnObject &result) override;
- virtual bool
- IsRemovable() const { return m_can_be_removed; }
+ bool
+ IsRemovable() const override
+ {
+ return m_can_be_removed;
+ }
void
SetRemovable (bool removable)
@@ -93,7 +100,6 @@ protected:
CommandObject::CommandMap m_subcommand_dict;
bool m_can_be_removed;
};
-
class CommandObjectProxy : public CommandObject
{
@@ -104,84 +110,80 @@ public:
const char *syntax = NULL,
uint32_t flags = 0);
- virtual
- ~CommandObjectProxy ();
+ ~CommandObjectProxy() override;
// Subclasses must provide a command object that will be transparently
// used for this object.
virtual CommandObject *
GetProxyCommandObject() = 0;
- virtual const char *
- GetHelpLong ();
+ const char *
+ GetHelpLong() override;
- virtual bool
- IsRemovable() const;
+ bool
+ IsRemovable() const override;
- virtual bool
- IsMultiwordObject ();
+ bool
+ IsMultiwordObject() override;
- virtual lldb::CommandObjectSP
- GetSubcommandSP (const char *sub_cmd, StringList *matches = NULL);
+ lldb::CommandObjectSP
+ GetSubcommandSP(const char *sub_cmd, StringList *matches = NULL) override;
- virtual CommandObject *
- GetSubcommandObject (const char *sub_cmd, StringList *matches = NULL);
+ CommandObject *
+ GetSubcommandObject(const char *sub_cmd, StringList *matches = NULL) override;
- virtual void
- AproposAllSubCommands (const char *prefix,
- const char *search_word,
- StringList &commands_found,
- StringList &commands_help);
-
- virtual bool
- LoadSubCommand (const char *cmd_name,
- const lldb::CommandObjectSP& command_obj);
-
- virtual bool
- WantsRawCommandString();
-
- virtual bool
- WantsCompletion();
-
- virtual Options *
- GetOptions ();
-
-
- virtual int
- HandleCompletion (Args &input,
- int &cursor_index,
- int &cursor_char_position,
- int match_start_point,
- int max_return_elements,
- bool &word_complete,
- StringList &matches);
-
- virtual int
- HandleArgumentCompletion (Args &input,
- int &cursor_index,
- int &cursor_char_position,
- OptionElementVector &opt_element_vector,
- int match_start_point,
- int max_return_elements,
- bool &word_complete,
- StringList &matches);
-
- virtual const char *
- GetRepeatCommand (Args ¤t_command_args,
- uint32_t index);
-
- virtual bool
- Execute (const char *args_string,
- CommandReturnObject &result);
+ void
+ AproposAllSubCommands(const char *prefix,
+ const char *search_word,
+ StringList &commands_found,
+ StringList &commands_help) override;
+
+ bool
+ LoadSubCommand(const char *cmd_name,
+ const lldb::CommandObjectSP& command_obj) override;
+
+ bool
+ WantsRawCommandString() override;
+
+ bool
+ WantsCompletion() override;
+
+ Options *
+ GetOptions() override;
+
+ int
+ HandleCompletion(Args &input,
+ int &cursor_index,
+ int &cursor_char_position,
+ int match_start_point,
+ int max_return_elements,
+ bool &word_complete,
+ StringList &matches) override;
+
+ int
+ HandleArgumentCompletion(Args &input,
+ int &cursor_index,
+ int &cursor_char_position,
+ OptionElementVector &opt_element_vector,
+ int match_start_point,
+ int max_return_elements,
+ bool &word_complete,
+ StringList &matches) override;
+
+ const char *
+ GetRepeatCommand(Args ¤t_command_args,
+ uint32_t index) override;
+
+ bool
+ Execute(const char *args_string,
+ CommandReturnObject &result) override;
protected:
-
// These two want to iterate over the subcommand dictionary.
friend class CommandInterpreter;
friend class CommandObjectSyntax;
-
};
} // namespace lldb_private
-#endif // liblldb_CommandObjectMultiword_h_
+#endif // liblldb_CommandObjectMultiword_h_
Modified: lldb/trunk/include/lldb/Interpreter/CommandObjectRegexCommand.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Interpreter/CommandObjectRegexCommand.h?rev=251054&r1=251053&r2=251054&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Interpreter/CommandObjectRegexCommand.h (original)
+++ lldb/trunk/include/lldb/Interpreter/CommandObjectRegexCommand.h Thu Oct 22 14:59:21 2015
@@ -28,7 +28,6 @@ namespace lldb_private {
class CommandObjectRegexCommand : public CommandObjectRaw
{
public:
-
CommandObjectRegexCommand (CommandInterpreter &interpreter,
const char *name,
const char *help,
@@ -37,8 +36,7 @@ public:
uint32_t completion_type_mask,
bool is_removable);
- virtual
- ~CommandObjectRegexCommand ();
+ ~CommandObjectRegexCommand() override;
bool
IsRemovable () const override { return m_is_removable; }
@@ -83,4 +81,4 @@ private:
} // namespace lldb_private
-#endif // liblldb_CommandObjectRegexCommand_h_
+#endif // liblldb_CommandObjectRegexCommand_h_
Modified: lldb/trunk/include/lldb/Interpreter/CommandOptionValidators.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Interpreter/CommandOptionValidators.h?rev=251054&r1=251053&r2=251054&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Interpreter/CommandOptionValidators.h (original)
+++ lldb/trunk/include/lldb/Interpreter/CommandOptionValidators.h Thu Oct 22 14:59:21 2015
@@ -10,6 +10,10 @@
#ifndef liblldb_CommandOptionValidators_h_
#define liblldb_CommandOptionValidators_h_
+// C Includes
+// C++ Includes
+// Other libraries and framework includes
+// Project includes
#include "lldb/lldb-private-types.h"
namespace lldb_private {
@@ -19,12 +23,11 @@ class ExecutionContext;
class PosixPlatformCommandOptionValidator : public OptionValidator
{
- virtual bool IsValid(Platform &platform, const ExecutionContext &target) const;
- virtual const char* ShortConditionString() const;
- virtual const char* LongConditionString() const;
+ bool IsValid(Platform &platform, const ExecutionContext &target) const override;
+ const char* ShortConditionString() const override;
+ const char* LongConditionString() const override;
};
} // namespace lldb_private
-
-#endif // liblldb_CommandOptionValidators_h_
+#endif // liblldb_CommandOptionValidators_h_
Modified: lldb/trunk/include/lldb/Interpreter/OptionGroupArchitecture.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Interpreter/OptionGroupArchitecture.h?rev=251054&r1=251053&r2=251054&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Interpreter/OptionGroupArchitecture.h (original)
+++ lldb/trunk/include/lldb/Interpreter/OptionGroupArchitecture.h Thu Oct 22 14:59:21 2015
@@ -29,23 +29,21 @@ public:
OptionGroupArchitecture ();
- virtual
- ~OptionGroupArchitecture ();
+ ~OptionGroupArchitecture() override;
+ uint32_t
+ GetNumDefinitions() override;
- virtual uint32_t
- GetNumDefinitions ();
+ const OptionDefinition*
+ GetDefinitions() override;
- virtual const OptionDefinition*
- GetDefinitions ();
+ Error
+ SetOptionValue(CommandInterpreter &interpreter,
+ uint32_t option_idx,
+ const char *option_value) override;
- virtual Error
- SetOptionValue (CommandInterpreter &interpreter,
- uint32_t option_idx,
- const char *option_value);
-
- virtual void
- OptionParsingStarting (CommandInterpreter &interpreter);
+ void
+ OptionParsingStarting(CommandInterpreter &interpreter) override;
bool
GetArchitecture (Platform *platform, ArchSpec &arch);
@@ -55,6 +53,7 @@ public:
{
return !m_arch_str.empty();
}
+
const char *
GetArchitectureName ()
{
@@ -70,4 +69,4 @@ protected:
} // namespace lldb_private
-#endif // liblldb_OptionGroupArchitecture_h_
+#endif // liblldb_OptionGroupArchitecture_h_
Modified: lldb/trunk/include/lldb/Interpreter/OptionGroupBoolean.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Interpreter/OptionGroupBoolean.h?rev=251054&r1=251053&r2=251054&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Interpreter/OptionGroupBoolean.h (original)
+++ lldb/trunk/include/lldb/Interpreter/OptionGroupBoolean.h Thu Oct 22 14:59:21 2015
@@ -36,29 +36,27 @@ namespace lldb_private {
bool default_value,
bool no_argument_toggle_default);
- virtual
- ~OptionGroupBoolean ();
-
-
- virtual uint32_t
- GetNumDefinitions ()
+ ~OptionGroupBoolean() override;
+
+ uint32_t
+ GetNumDefinitions() override
{
return 1;
}
- virtual const OptionDefinition*
- GetDefinitions ()
+ const OptionDefinition*
+ GetDefinitions() override
{
return &m_option_definition;
}
- virtual Error
- SetOptionValue (CommandInterpreter &interpreter,
- uint32_t option_idx,
- const char *option_value);
+ Error
+ SetOptionValue(CommandInterpreter &interpreter,
+ uint32_t option_idx,
+ const char *option_value) override;
- virtual void
- OptionParsingStarting (CommandInterpreter &interpreter);
+ void
+ OptionParsingStarting(CommandInterpreter &interpreter) override;
OptionValueBoolean &
GetOptionValue ()
@@ -75,9 +73,8 @@ namespace lldb_private {
protected:
OptionValueBoolean m_value;
OptionDefinition m_option_definition;
-
};
} // namespace lldb_private
-#endif // liblldb_OptionGroupBoolean_h_
+#endif // liblldb_OptionGroupBoolean_h_
Modified: lldb/trunk/include/lldb/Interpreter/OptionGroupFile.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Interpreter/OptionGroupFile.h?rev=251054&r1=251053&r2=251054&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Interpreter/OptionGroupFile.h (original)
+++ lldb/trunk/include/lldb/Interpreter/OptionGroupFile.h Thu Oct 22 14:59:21 2015
@@ -1,4 +1,4 @@
-//===-- OptionGroupFile.h -------------------------------*- C++ -*-===//
+//===-- OptionGroupFile.h ---------------------------------------*- C++ -*-===//
//
// The LLVM Compiler Infrastructure
//
@@ -27,7 +27,6 @@ namespace lldb_private {
class OptionGroupFile : public OptionGroup
{
public:
-
OptionGroupFile (uint32_t usage_mask,
bool required,
const char *long_option,
@@ -36,29 +35,27 @@ public:
lldb::CommandArgumentType argument_type,
const char *usage_text);
- virtual
- ~OptionGroupFile ();
+ ~OptionGroupFile() override;
-
- virtual uint32_t
- GetNumDefinitions ()
+ uint32_t
+ GetNumDefinitions() override
{
return 1;
}
- virtual const OptionDefinition*
- GetDefinitions ()
+ const OptionDefinition*
+ GetDefinitions() override
{
return &m_option_definition;
}
- virtual Error
- SetOptionValue (CommandInterpreter &interpreter,
- uint32_t option_idx,
- const char *option_value);
+ Error
+ SetOptionValue(CommandInterpreter &interpreter,
+ uint32_t option_idx,
+ const char *option_value) override;
- virtual void
- OptionParsingStarting (CommandInterpreter &interpreter);
+ void
+ OptionParsingStarting(CommandInterpreter &interpreter) override;
OptionValueFileSpec &
GetOptionValue ()
@@ -75,7 +72,6 @@ public:
protected:
OptionValueFileSpec m_file;
OptionDefinition m_option_definition;
-
};
//-------------------------------------------------------------------------
@@ -94,30 +90,27 @@ public:
lldb::CommandArgumentType argument_type,
const char *usage_text);
- virtual
- ~OptionGroupFileList ();
+ ~OptionGroupFileList() override;
-
- virtual uint32_t
- GetNumDefinitions ()
+ uint32_t
+ GetNumDefinitions() override
{
return 1;
}
- virtual const OptionDefinition*
- GetDefinitions ()
+ const OptionDefinition*
+ GetDefinitions() override
{
return &m_option_definition;
}
- virtual Error
- SetOptionValue (CommandInterpreter &interpreter,
- uint32_t option_idx,
- const char *option_value);
-
- virtual void
- OptionParsingStarting (CommandInterpreter &interpreter);
+ Error
+ SetOptionValue(CommandInterpreter &interpreter,
+ uint32_t option_idx,
+ const char *option_value) override;
+ void
+ OptionParsingStarting(CommandInterpreter &interpreter) override;
OptionValueFileSpecList &
GetOptionValue ()
@@ -134,9 +127,8 @@ public:
protected:
OptionValueFileSpecList m_file_list;
OptionDefinition m_option_definition;
-
};
} // namespace lldb_private
-#endif // liblldb_OptionGroupFile_h_
+#endif // liblldb_OptionGroupFile_h_
Modified: lldb/trunk/include/lldb/Interpreter/OptionGroupFormat.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Interpreter/OptionGroupFormat.h?rev=251054&r1=251053&r2=251054&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Interpreter/OptionGroupFormat.h (original)
+++ lldb/trunk/include/lldb/Interpreter/OptionGroupFormat.h Thu Oct 22 14:59:21 2015
@@ -1,4 +1,4 @@
-//===-- OptionGroupFormat.h -------------------------------*- C++ -*-===//
+//===-- OptionGroupFormat.h -------------------------------------*- C++ -*-===//
//
// The LLVM Compiler Infrastructure
//
@@ -37,23 +37,21 @@ public:
uint64_t default_byte_size = UINT64_MAX, // Pass UINT64_MAX to disable the "--size" option
uint64_t default_count = UINT64_MAX); // Pass UINT64_MAX to disable the "--count" option
- virtual
- ~OptionGroupFormat ();
+ ~OptionGroupFormat() override;
+ uint32_t
+ GetNumDefinitions() override;
- virtual uint32_t
- GetNumDefinitions ();
+ const OptionDefinition*
+ GetDefinitions() override;
- virtual const OptionDefinition*
- GetDefinitions ();
+ Error
+ SetOptionValue(CommandInterpreter &interpreter,
+ uint32_t option_idx,
+ const char *option_value) override;
- virtual Error
- SetOptionValue (CommandInterpreter &interpreter,
- uint32_t option_idx,
- const char *option_value);
-
- virtual void
- OptionParsingStarting (CommandInterpreter &interpreter);
+ void
+ OptionParsingStarting(CommandInterpreter &interpreter) override;
lldb::Format
GetFormat () const
@@ -112,7 +110,6 @@ public:
}
protected:
-
bool
ParserGDBFormatLetter (CommandInterpreter &interpreter,
char format_letter,
@@ -124,10 +121,9 @@ protected:
OptionValueUInt64 m_count;
char m_prev_gdb_format;
char m_prev_gdb_size;
-
bool m_has_gdb_format;
};
} // namespace lldb_private
-#endif // liblldb_OptionGroupFormat_h_
+#endif // liblldb_OptionGroupFormat_h_
Modified: lldb/trunk/include/lldb/Interpreter/OptionGroupOutputFile.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Interpreter/OptionGroupOutputFile.h?rev=251054&r1=251053&r2=251054&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Interpreter/OptionGroupOutputFile.h (original)
+++ lldb/trunk/include/lldb/Interpreter/OptionGroupOutputFile.h Thu Oct 22 14:59:21 2015
@@ -1,4 +1,4 @@
-//===-- OptionGroupOutputFile.h -------------------------------*- C++ -*-===//
+//===-- OptionGroupOutputFile.h ---------------------------------*- C++ -*-===//
//
// The LLVM Compiler Infrastructure
//
@@ -26,26 +26,23 @@ namespace lldb_private {
class OptionGroupOutputFile : public OptionGroup
{
public:
-
OptionGroupOutputFile ();
- virtual
- ~OptionGroupOutputFile ();
+ ~OptionGroupOutputFile() override;
+ uint32_t
+ GetNumDefinitions() override;
- virtual uint32_t
- GetNumDefinitions ();
-
- virtual const OptionDefinition*
- GetDefinitions ();
+ const OptionDefinition*
+ GetDefinitions() override;
- virtual Error
- SetOptionValue (CommandInterpreter &interpreter,
- uint32_t option_idx,
- const char *option_value);
+ Error
+ SetOptionValue(CommandInterpreter &interpreter,
+ uint32_t option_idx,
+ const char *option_value) override;
- virtual void
- OptionParsingStarting (CommandInterpreter &interpreter);
+ void
+ OptionParsingStarting(CommandInterpreter &interpreter) override;
const OptionValueFileSpec &
GetFile ()
@@ -68,9 +65,8 @@ public:
protected:
OptionValueFileSpec m_file;
OptionValueBoolean m_append;
-
};
} // namespace lldb_private
-#endif // liblldb_OptionGroupOutputFile_h_
+#endif // liblldb_OptionGroupOutputFile_h_
Modified: lldb/trunk/include/lldb/Interpreter/OptionGroupPlatform.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Interpreter/OptionGroupPlatform.h?rev=251054&r1=251053&r2=251054&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Interpreter/OptionGroupPlatform.h (original)
+++ lldb/trunk/include/lldb/Interpreter/OptionGroupPlatform.h Thu Oct 22 14:59:21 2015
@@ -27,7 +27,6 @@ namespace lldb_private {
class OptionGroupPlatform : public OptionGroup
{
public:
-
OptionGroupPlatform (bool include_platform_option) :
OptionGroup(),
m_platform_name (),
@@ -39,24 +38,21 @@ public:
{
}
- virtual
- ~OptionGroupPlatform ()
- {
- }
+ ~OptionGroupPlatform() override = default;
- virtual uint32_t
- GetNumDefinitions ();
+ uint32_t
+ GetNumDefinitions() override;
- virtual const OptionDefinition*
- GetDefinitions ();
+ const OptionDefinition*
+ GetDefinitions() override;
- virtual Error
- SetOptionValue (CommandInterpreter &interpreter,
- uint32_t option_idx,
- const char *option_value);
+ Error
+ SetOptionValue(CommandInterpreter &interpreter,
+ uint32_t option_idx,
+ const char *option_value) override;
- virtual void
- OptionParsingStarting (CommandInterpreter &interpreter);
+ void
+ OptionParsingStarting(CommandInterpreter &interpreter) override;
lldb::PlatformSP
CreatePlatformWithOptions (CommandInterpreter &interpreter,
@@ -119,4 +115,4 @@ protected:
} // namespace lldb_private
-#endif // liblldb_OptionGroupPlatform_h_
+#endif // liblldb_OptionGroupPlatform_h_
Modified: lldb/trunk/include/lldb/Interpreter/OptionGroupString.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Interpreter/OptionGroupString.h?rev=251054&r1=251053&r2=251054&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Interpreter/OptionGroupString.h (original)
+++ lldb/trunk/include/lldb/Interpreter/OptionGroupString.h Thu Oct 22 14:59:21 2015
@@ -1,4 +1,4 @@
-//===-- OptionGroupString.h ------------------------------------*- C++ -*-===//
+//===-- OptionGroupString.h -------------------------------------*- C++ -*-===//
//
// The LLVM Compiler Infrastructure
//
@@ -25,7 +25,6 @@ namespace lldb_private {
class OptionGroupString : public OptionGroup
{
public:
-
OptionGroupString (uint32_t usage_mask,
bool required,
const char *long_option,
@@ -35,29 +34,27 @@ namespace lldb_private {
const char *usage_text,
const char *default_value);
- virtual
- ~OptionGroupString ();
-
-
- virtual uint32_t
- GetNumDefinitions ()
+ ~OptionGroupString() override;
+
+ uint32_t
+ GetNumDefinitions() override
{
return 1;
}
- virtual const OptionDefinition*
- GetDefinitions ()
+ const OptionDefinition*
+ GetDefinitions() override
{
return &m_option_definition;
}
- virtual Error
- SetOptionValue (CommandInterpreter &interpreter,
- uint32_t option_idx,
- const char *option_value);
+ Error
+ SetOptionValue(CommandInterpreter &interpreter,
+ uint32_t option_idx,
+ const char *option_value) override;
- virtual void
- OptionParsingStarting (CommandInterpreter &interpreter);
+ void
+ OptionParsingStarting(CommandInterpreter &interpreter) override;
OptionValueString &
GetOptionValue ()
@@ -74,9 +71,8 @@ namespace lldb_private {
protected:
OptionValueString m_value;
OptionDefinition m_option_definition;
-
};
} // namespace lldb_private
-#endif // liblldb_OptionGroupString_h_
+#endif // liblldb_OptionGroupString_h_
Modified: lldb/trunk/include/lldb/Interpreter/OptionGroupUInt64.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Interpreter/OptionGroupUInt64.h?rev=251054&r1=251053&r2=251054&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Interpreter/OptionGroupUInt64.h (original)
+++ lldb/trunk/include/lldb/Interpreter/OptionGroupUInt64.h Thu Oct 22 14:59:21 2015
@@ -1,4 +1,4 @@
-//===-- OptionGroupUInt64.h ------------------------------------*- C++ -*-===//
+//===-- OptionGroupUInt64.h -------------------------------------*- C++ -*-===//
//
// The LLVM Compiler Infrastructure
//
@@ -18,6 +18,7 @@
#include "lldb/Interpreter/OptionValueUInt64.h"
namespace lldb_private {
+
//-------------------------------------------------------------------------
// OptionGroupUInt64
//-------------------------------------------------------------------------
@@ -25,7 +26,6 @@ namespace lldb_private {
class OptionGroupUInt64 : public OptionGroup
{
public:
-
OptionGroupUInt64 (uint32_t usage_mask,
bool required,
const char *long_option,
@@ -35,29 +35,27 @@ namespace lldb_private {
const char *usage_text,
uint64_t default_value);
- virtual
- ~OptionGroupUInt64 ();
-
-
- virtual uint32_t
- GetNumDefinitions ()
+ ~OptionGroupUInt64() override;
+
+ uint32_t
+ GetNumDefinitions() override
{
return 1;
}
- virtual const OptionDefinition*
- GetDefinitions ()
+ const OptionDefinition*
+ GetDefinitions() override
{
return &m_option_definition;
}
- virtual Error
- SetOptionValue (CommandInterpreter &interpreter,
- uint32_t option_idx,
- const char *option_value);
+ Error
+ SetOptionValue(CommandInterpreter &interpreter,
+ uint32_t option_idx,
+ const char *option_value) override;
- virtual void
- OptionParsingStarting (CommandInterpreter &interpreter);
+ void
+ OptionParsingStarting(CommandInterpreter &interpreter) override;
OptionValueUInt64 &
GetOptionValue ()
@@ -74,9 +72,8 @@ namespace lldb_private {
protected:
OptionValueUInt64 m_value;
OptionDefinition m_option_definition;
-
};
} // namespace lldb_private
-#endif // liblldb_OptionGroupUInt64_h_
+#endif // liblldb_OptionGroupUInt64_h_
Modified: lldb/trunk/include/lldb/Interpreter/OptionGroupUUID.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Interpreter/OptionGroupUUID.h?rev=251054&r1=251053&r2=251054&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Interpreter/OptionGroupUUID.h (original)
+++ lldb/trunk/include/lldb/Interpreter/OptionGroupUUID.h Thu Oct 22 14:59:21 2015
@@ -18,6 +18,7 @@
#include "lldb/Interpreter/OptionValueUUID.h"
namespace lldb_private {
+
//-------------------------------------------------------------------------
// OptionGroupUUID
//-------------------------------------------------------------------------
@@ -25,26 +26,23 @@ namespace lldb_private {
class OptionGroupUUID : public OptionGroup
{
public:
-
OptionGroupUUID ();
- virtual
- ~OptionGroupUUID ();
+ ~OptionGroupUUID() override;
+ uint32_t
+ GetNumDefinitions() override;
- virtual uint32_t
- GetNumDefinitions ();
-
- virtual const OptionDefinition*
- GetDefinitions ();
+ const OptionDefinition*
+ GetDefinitions() override;
- virtual Error
- SetOptionValue (CommandInterpreter &interpreter,
- uint32_t option_idx,
- const char *option_value);
+ Error
+ SetOptionValue(CommandInterpreter &interpreter,
+ uint32_t option_idx,
+ const char *option_value) override;
- virtual void
- OptionParsingStarting (CommandInterpreter &interpreter);
+ void
+ OptionParsingStarting(CommandInterpreter &interpreter) override;
const OptionValueUUID &
GetOptionValue () const
@@ -58,4 +56,4 @@ protected:
} // namespace lldb_private
-#endif // liblldb_OptionGroupUUID_h_
+#endif // liblldb_OptionGroupUUID_h_
Modified: lldb/trunk/include/lldb/Interpreter/OptionGroupValueObjectDisplay.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Interpreter/OptionGroupValueObjectDisplay.h?rev=251054&r1=251053&r2=251054&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Interpreter/OptionGroupValueObjectDisplay.h (original)
+++ lldb/trunk/include/lldb/Interpreter/OptionGroupValueObjectDisplay.h Thu Oct 22 14:59:21 2015
@@ -1,4 +1,4 @@
-//===-- OptionGroupValueObjectDisplay.h -------------------------------*- C++ -*-===//
+//===-- OptionGroupValueObjectDisplay.h -------------------------*- C++ -*-===//
//
// The LLVM Compiler Infrastructure
//
@@ -26,41 +26,38 @@ namespace lldb_private {
class OptionGroupValueObjectDisplay : public OptionGroup
{
public:
-
OptionGroupValueObjectDisplay ();
- virtual
- ~OptionGroupValueObjectDisplay ();
+ ~OptionGroupValueObjectDisplay() override;
+ uint32_t
+ GetNumDefinitions() override;
- virtual uint32_t
- GetNumDefinitions ();
-
- virtual const OptionDefinition*
- GetDefinitions ();
+ const OptionDefinition*
+ GetDefinitions() override;
- virtual Error
- SetOptionValue (CommandInterpreter &interpreter,
- uint32_t option_idx,
- const char *option_value);
+ Error
+ SetOptionValue(CommandInterpreter &interpreter,
+ uint32_t option_idx,
+ const char *option_value) override;
- virtual void
- OptionParsingStarting (CommandInterpreter &interpreter);
+ void
+ OptionParsingStarting(CommandInterpreter &interpreter) override;
bool
AnyOptionWasSet () const
{
- return show_types == true ||
- no_summary_depth != 0 ||
- show_location == true ||
- flat_output == true ||
- use_objc == true ||
+ return show_types ||
+ no_summary_depth != 0 ||
+ show_location ||
+ flat_output ||
+ use_objc ||
max_depth != UINT32_MAX ||
ptr_depth != 0 ||
- use_synth == false ||
- be_raw == true ||
- ignore_cap == true ||
- run_validator == true;
+ !use_synth ||
+ be_raw ||
+ ignore_cap ||
+ run_validator;
}
DumpValueObjectOptions
@@ -85,4 +82,4 @@ public:
} // namespace lldb_private
-#endif // liblldb_OptionGroupValueObjectDisplay_h_
+#endif // liblldb_OptionGroupValueObjectDisplay_h_
Modified: lldb/trunk/include/lldb/Interpreter/OptionGroupVariable.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Interpreter/OptionGroupVariable.h?rev=251054&r1=251053&r2=251054&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Interpreter/OptionGroupVariable.h (original)
+++ lldb/trunk/include/lldb/Interpreter/OptionGroupVariable.h Thu Oct 22 14:59:21 2015
@@ -26,25 +26,23 @@ namespace lldb_private {
class OptionGroupVariable : public OptionGroup
{
public:
-
OptionGroupVariable (bool show_frame_options);
- virtual
- ~OptionGroupVariable ();
-
- virtual uint32_t
- GetNumDefinitions ();
+ ~OptionGroupVariable() override;
+
+ uint32_t
+ GetNumDefinitions() override;
- virtual const OptionDefinition*
- GetDefinitions ();
+ const OptionDefinition*
+ GetDefinitions() override;
- virtual Error
- SetOptionValue (CommandInterpreter &interpreter,
- uint32_t option_idx,
- const char *option_arg);
+ Error
+ SetOptionValue(CommandInterpreter &interpreter,
+ uint32_t option_idx,
+ const char *option_arg) override;
- virtual void
- OptionParsingStarting (CommandInterpreter &interpreter);
+ void
+ OptionParsingStarting(CommandInterpreter &interpreter) override;
bool include_frame_options:1,
show_args:1, // Frame option only (include_frame_options == true)
@@ -62,4 +60,4 @@ namespace lldb_private {
} // namespace lldb_private
-#endif // liblldb_OptionGroupVariable_h_
+#endif // liblldb_OptionGroupVariable_h_
Modified: lldb/trunk/include/lldb/Interpreter/OptionGroupWatchpoint.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Interpreter/OptionGroupWatchpoint.h?rev=251054&r1=251053&r2=251054&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Interpreter/OptionGroupWatchpoint.h (original)
+++ lldb/trunk/include/lldb/Interpreter/OptionGroupWatchpoint.h Thu Oct 22 14:59:21 2015
@@ -25,28 +25,26 @@ namespace lldb_private {
class OptionGroupWatchpoint : public OptionGroup
{
public:
-
+ OptionGroupWatchpoint ();
+
+ ~OptionGroupWatchpoint() override;
+
static bool
IsWatchSizeSupported(uint32_t watch_size);
- OptionGroupWatchpoint ();
-
- virtual
- ~OptionGroupWatchpoint ();
-
- virtual uint32_t
- GetNumDefinitions ();
+ uint32_t
+ GetNumDefinitions() override;
- virtual const OptionDefinition*
- GetDefinitions ();
+ const OptionDefinition*
+ GetDefinitions() override;
- virtual Error
- SetOptionValue (CommandInterpreter &interpreter,
- uint32_t option_idx,
- const char *option_arg);
+ Error
+ SetOptionValue(CommandInterpreter &interpreter,
+ uint32_t option_idx,
+ const char *option_arg) override;
- virtual void
- OptionParsingStarting (CommandInterpreter &interpreter);
+ void
+ OptionParsingStarting(CommandInterpreter &interpreter) override;
// Note:
// eWatchRead == LLDB_WATCH_TYPE_READ; and
@@ -68,4 +66,4 @@ namespace lldb_private {
} // namespace lldb_private
-#endif // liblldb_OptionGroupWatchpoint_h_
+#endif // liblldb_OptionGroupWatchpoint_h_
Modified: lldb/trunk/include/lldb/Interpreter/Options.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Interpreter/Options.h?rev=251054&r1=251053&r2=251054&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Interpreter/Options.h (original)
+++ lldb/trunk/include/lldb/Interpreter/Options.h Thu Oct 22 14:59:21 2015
@@ -11,7 +11,6 @@
#define liblldb_Options_h_
// C Includes
-
// C++ Includes
#include <set>
#include <vector>
@@ -32,7 +31,6 @@ namespace lldb_private {
return isprint(ch);
}
-
//----------------------------------------------------------------------
/// @class Options Options.h "lldb/Interpreter/Options.h"
/// @brief A command line option parsing protocol class.
@@ -119,7 +117,6 @@ namespace lldb_private {
class Options
{
public:
-
Options (CommandInterpreter &interpreter);
virtual
@@ -153,7 +150,6 @@ public:
// Verify that the options given are in the options table and can
// be used together, but there may be some required options that are
// missing (used to verify options that get folded into command aliases).
-
bool
VerifyPartialOptions (CommandReturnObject &result);
@@ -359,15 +355,11 @@ protected:
class OptionGroup
{
public:
- OptionGroup ()
- {
- }
-
+ OptionGroup() = default;
+
virtual
- ~OptionGroup ()
- {
- }
-
+ ~OptionGroup() = default;
+
virtual uint32_t
GetNumDefinitions () = 0;
@@ -395,7 +387,6 @@ protected:
class OptionGroupOptions : public Options
{
public:
-
OptionGroupOptions (CommandInterpreter &interpreter) :
Options (interpreter),
m_option_defs (),
@@ -404,12 +395,8 @@ protected:
{
}
- virtual
- ~OptionGroupOptions ()
- {
- }
-
-
+ ~OptionGroupOptions() override = default;
+
//----------------------------------------------------------------------
/// Append options from a OptionGroup class.
///
@@ -459,18 +446,18 @@ protected:
return m_did_finalize;
}
- virtual Error
- SetOptionValue (uint32_t option_idx,
- const char *option_arg);
+ Error
+ SetOptionValue(uint32_t option_idx,
+ const char *option_arg) override;
- virtual void
- OptionParsingStarting ();
+ void
+ OptionParsingStarting() override;
- virtual Error
- OptionParsingFinished ();
+ Error
+ OptionParsingFinished() override;
const OptionDefinition*
- GetDefinitions ()
+ GetDefinitions() override
{
assert (m_did_finalize);
return &m_option_defs[0];
@@ -495,8 +482,7 @@ protected:
OptionInfos m_option_infos;
bool m_did_finalize;
};
-
} // namespace lldb_private
-#endif // liblldb_Options_h_
+#endif // liblldb_Options_h_
Modified: lldb/trunk/include/lldb/Interpreter/ScriptInterpreter.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Interpreter/ScriptInterpreter.h?rev=251054&r1=251053&r2=251054&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Interpreter/ScriptInterpreter.h (original)
+++ lldb/trunk/include/lldb/Interpreter/ScriptInterpreter.h Thu Oct 22 14:59:21 2015
@@ -10,6 +10,10 @@
#ifndef liblldb_ScriptInterpreter_h_
#define liblldb_ScriptInterpreter_h_
+// C Includes
+// C++ Includes
+// Other libraries and framework includes
+// Project includes
#include "lldb/lldb-private.h"
#include "lldb/Core/Broadcaster.h"
@@ -19,20 +23,16 @@
#include "lldb/Utility/PseudoTerminal.h"
-
namespace lldb_private {
class ScriptInterpreterLocker
{
public:
- ScriptInterpreterLocker ()
- {
- }
+ ScriptInterpreterLocker() = default;
- virtual ~ScriptInterpreterLocker ()
- {
- }
+ virtual ~ScriptInterpreterLocker() = default;
+
private:
DISALLOW_COPY_AND_ASSIGN (ScriptInterpreterLocker);
};
@@ -40,7 +40,6 @@ private:
class ScriptInterpreter : public PluginInterface
{
public:
-
typedef enum
{
eScriptReturnTypeCharPtr,
@@ -62,7 +61,7 @@ public:
ScriptInterpreter (CommandInterpreter &interpreter, lldb::ScriptLanguage script_lang);
- virtual ~ScriptInterpreter ();
+ ~ScriptInterpreter() override;
struct ExecuteScriptOptions
{
@@ -324,7 +323,6 @@ public:
SetBreakpointCommandCallbackFunction (BreakpointOptions *bp_options,
const char *function_name)
{
- return;
}
/// Set a one-liner as the callback for the watchpoint.
@@ -332,7 +330,6 @@ public:
SetWatchpointCommandCallback (WatchpointOptions *wp_options,
const char *oneliner)
{
- return;
}
virtual bool
@@ -459,7 +456,7 @@ public:
virtual bool
GetDocumentationForItem (const char* item, std::string& dest)
{
- dest.clear();
+ dest.clear();
return false;
}
@@ -514,8 +511,8 @@ public:
int
GetMasterFileDescriptor ();
- CommandInterpreter &
- GetCommandInterpreter ();
+ CommandInterpreter &
+ GetCommandInterpreter();
static std::string
LanguageToString (lldb::ScriptLanguage language);
@@ -530,4 +527,4 @@ protected:
} // namespace lldb_private
-#endif // #ifndef liblldb_ScriptInterpreter_h_
+#endif // liblldb_ScriptInterpreter_h_
More information about the lldb-commits
mailing list