Skip to content

Commit

Permalink
[lldb] Fix warning: extra ';' outside of a function is incompatible w…
Browse files Browse the repository at this point in the history
…ith C++98

Fix warning, remove trailing whitespace and fix formatting.
  • Loading branch information
JDevlieghere committed May 2, 2023
1 parent 9cb3af1 commit fe3ee68
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions lldb/source/Commands/CommandObjectType.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ const char *FormatCategoryToString(FormatCategoryItem item, bool long_name) {
return "format";
}
llvm_unreachable("Fully covered switch above!");
};
}

#define LLDB_OPTIONS_type_summary_add
#include "CommandOptions.inc"
Expand Down Expand Up @@ -770,11 +770,11 @@ class CommandObjectTypeFormatterDelete : public CommandObjectParsed {
FormatCategoryItem m_formatter_kind;

Options *GetOptions() override { return &m_options; }
static constexpr const char *g_short_help_template =

static constexpr const char *g_short_help_template =
"Delete an existing %s for a type.";

static constexpr const char *g_long_help_template =
static constexpr const char *g_long_help_template =
"Delete an existing %s for a type. Unless you specify a "
"specific category or all categories, only the "
"'default' category is searched. The names must be exactly as "
Expand All @@ -783,9 +783,9 @@ class CommandObjectTypeFormatterDelete : public CommandObjectParsed {
public:
CommandObjectTypeFormatterDelete(CommandInterpreter &interpreter,
FormatCategoryItem formatter_kind)
: CommandObjectParsed(interpreter,
: CommandObjectParsed(interpreter,
FormatCategoryToString(formatter_kind, false)),
m_formatter_kind(formatter_kind) {
m_formatter_kind(formatter_kind) {
CommandArgumentEntry type_arg;
CommandArgumentData type_style_arg;

Expand All @@ -795,10 +795,10 @@ class CommandObjectTypeFormatterDelete : public CommandObjectParsed {
type_arg.push_back(type_style_arg);

m_arguments.push_back(type_arg);

const char *kind = FormatCategoryToString(formatter_kind, true);
const char *short_kind = FormatCategoryToString(formatter_kind, false);

StreamString s;
s.Printf(g_short_help_template, kind);
SetHelp(s.GetData());
Expand Down

0 comments on commit fe3ee68

Please sign in to comment.