[Lldb-commits] [PATCH] D148282: Fix the help for "type X delete" to make the -a & -w behaviors clear

Alex Langford via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Thu Apr 13 18:07:34 PDT 2023


bulbazord added inline comments.


================
Comment at: lldb/source/Commands/CommandObjectType.cpp:112-113
+    return "format";
+  }
+};
+
----------------
maybe add an `llvm_unreachable` after the switch statement? 


================
Comment at: lldb/source/Commands/CommandObjectType.cpp:879-885
+const char *CommandObjectTypeFormatterDelete::g_short_help_template = 
+    "Delete an existing %s for a type.";
+const char *CommandObjectTypeFormatterDelete::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 "
+            "shown in the 'type %s list' output";
----------------
You could define these in the class and not out-of-line if you use constexpr. So for example, above in the class you can do:

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




Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D148282/new/

https://reviews.llvm.org/D148282



More information about the lldb-commits mailing list