[llvm] [Support] Show '[subcommand]' in the help for less than 3 subcommands (PR #74557)
Igor Kudrin via llvm-commits
llvm-commits at lists.llvm.org
Thu Dec 7 15:46:52 PST 2023
igorkudrin wrote:
> LGTM. Strange that the original patch ([79f3333](https://github.com/llvm/llvm-project/commit/79f3333d3f04c26cde06a663dca7b79e1ac86345)) used `> 2` for "at least 1". I wonder if some refactoring later caused the issue?
Thanks. I guess that it was made to match the condition `(Sub == &*TopLevelSubCommand && Subs.size() > 2)` a few lines later. And (just guessing again) the original idea about `Subs.size() > 2` might have been based on the assumption that two special subcommands, `TopLevel` and `All`, would also be added to the list. And all this proves once again the importance of testing.
https://github.com/llvm/llvm-project/pull/74557
More information about the llvm-commits
mailing list