[all-commits] [llvm/llvm-project] de8ee0: [CommandLine] Better report unknown subcommands (#...
Igor Kudrin via All-commits
all-commits at lists.llvm.org
Wed Dec 13 17:29:43 PST 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: de8ee03ed916feb37b602b93c07f0dade8fd0050
https://github.com/llvm/llvm-project/commit/de8ee03ed916feb37b602b93c07f0dade8fd0050
Author: Igor Kudrin <ikudrin at accesssoftek.com>
Date: 2023-12-14 (Thu, 14 Dec 2023)
Changed paths:
M llvm/lib/Support/CommandLine.cpp
M llvm/unittests/Support/CommandLineTest.cpp
Log Message:
-----------
[CommandLine] Better report unknown subcommands (#74811)
The patch improves the reporting for the first option in the command
line when it looks like a subcommand name but does not match any
defined.
Before the patch:
```
> prog baz
prog: Unknown command line argument 'baz'. Try: 'prog --help'
```
With the patch:
```
> prog baz
prog: Unknown subcommand 'baz'. Try: 'prog --help'
prog: Did you mean 'bar'?
```
More information about the All-commits
mailing list