[Lldb-commits] [PATCH] D49106: Refactor parsing of argument lists with a raw string suffix.

Jim Ingham via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Mon Jul 9 18:09:59 PDT 2018


jingham added a comment.

This is great.  The only quibble I have is that I would really like to restrict ArgsWithSuffix to be "OptionsWithSuffix".  I don't think we want to add:

(lldb) some_cmd -f 0 -g 0 SomeArg OtherArg -- raw string

That seems unnecessarily general, and not terribly helpful.  So at minimum I'd suggest calling the new class "OptionsWithSuffix" or even "OptionsWithRaw" since CommandObjectRaw will be the main user of this.

Note, you half enforce that at present because you require the first word of the argument list to be "-" for there to be any argument parsing at all.  If you can think of a good way of checking that there weren't errant trailing args before the "--" that's a bonus, though it might be good enough to just document this as the required behavior...


https://reviews.llvm.org/D49106





More information about the lldb-commits mailing list