[Lldb-commits] [lldb] fe3ee68 - [lldb] Fix warning: extra '; ' outside of a function is incompatible with C++98
Jonas Devlieghere via lldb-commits
lldb-commits at lists.llvm.org
Mon May 1 21:24:48 PDT 2023
Author: Jonas Devlieghere
Date: 2023-05-01T21:23:47-07:00
New Revision: fe3ee680741d603dd1229571e86e62bdb88ea215
URL: https://github.com/llvm/llvm-project/commit/fe3ee680741d603dd1229571e86e62bdb88ea215
DIFF: https://github.com/llvm/llvm-project/commit/fe3ee680741d603dd1229571e86e62bdb88ea215.diff
LOG: [lldb] Fix warning: extra ';' outside of a function is incompatible with C++98
Fix warning, remove trailing whitespace and fix formatting.
Added:
Modified:
lldb/source/Commands/CommandObjectType.cpp
Removed:
################################################################################
diff --git a/lldb/source/Commands/CommandObjectType.cpp b/lldb/source/Commands/CommandObjectType.cpp
index 2c2973a6272f..b6c379bdb434 100644
--- a/lldb/source/Commands/CommandObjectType.cpp
+++ b/lldb/source/Commands/CommandObjectType.cpp
@@ -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"
@@ -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 "
@@ -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;
@@ -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());
More information about the lldb-commits
mailing list