This is an archive of the discontinued LLVM Phabricator instance.

[lldb] tab completion for class `CommandObjectTypeFormatterDelete`
ClosedPublic

Authored by MrHate on Jul 20 2020, 1:30 AM.

Details

Summary
  1. Added a dedicated completion to class CommandObjectTypeFormatterDelete which can be used by these commands: type filter/format/summary/synthetic delete;
  2. Added a related test case.

Diff Detail

Event Timeline

MrHate created this revision.Jul 20 2020, 1:30 AM

I just realized those patches probably conflict with the refactoring I'm doing with that code at the moment. I'll take care of the conflicts in your patches, but if you can push them back and maybe do other completions first then that would help a lot :)

JDevlieghere added inline comments.Jul 24 2020, 10:13 AM
lldb/include/lldb/DataFormatters/FormattersContainer.h
231

Please make this a Doxygen comment (///).

lldb/source/Commands/CommandObjectType.cpp
791

This is a lot of code duplication. Cann you hide this behind a macro? I'm thinking of something like:

#define CHECK_MASK(MASK, VALUE) MASK & VALUE == VALUE
MrHate updated this revision to Diff 280640.Jul 24 2020, 5:57 PM
  • Made the comment for EmptyStruct a Doxygen comment;
  • Refactored m_formatter_kind_mask check with a macro CHECK_FORMATTER_KIND_MASK.
This revision is now accepted and ready to land.Aug 27 2020, 1:12 AM
MrHate updated this revision to Diff 288248.Aug 27 2020, 2:39 AM
  • Rebased the patch with the latest master branch and refactored FormattersContainer::AutoComplete with the latest interface.