Issue 177511
Summary The lldb command argument parser should check number of arguments before dispatching to commands
Labels new issue
Assignees
Reporter jimingham
    We ask all the commands to specify their argument lists with type and repeat type by setting the valid argument lists in the command object's m_arguments vector.

We use that to print help, but we should also use that to validate argument lists before passing them to the DoExecute of the command.

It's silly to have said "My command takes one argument, with no repeats" and then have DoExecute have to handle the case where the number of arguments is not 1.  That leads to lots of redundant boiler-plate, and means the reporting for the same error varies from command to command.
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to