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

Jim Ingham via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Thu Apr 13 17:52:12 PDT 2023


jingham created this revision.
jingham added reviewers: JDevlieghere, aprantl.
Herald added a project: All.
jingham requested review of this revision.
Herald added a project: LLDB.
Herald added a subscriber: lldb-commits.

If you run:

(lldb) type summary delete Foo

that will only search for the type summary for Foo in the "default" category.  That's by design, since this is "delete" you wouldn't want to accidentally delete a format it might be hard to get back, so making you specify the category or say "all" explicitly is a good safeguard.  But the help is not at all clear that that's how it works and it has confused several people now.

This patch fixes the help strings.  Since all the `type X delete` commands go through a common base, I centralized the help output in the base class so the help would be consistent.  I also removed an unused macro, and changed where we were calling these `formatter_kind_mask` to be `formatter_kind` since we only use them as a single enum element, we never use them as masks in this context.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D148282

Files:
  lldb/source/Commands/CommandObjectType.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D148282.513400.patch
Type: text/x-patch
Size: 7592 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20230414/d1d6a453/attachment-0001.bin>


More information about the lldb-commits mailing list