[clang] Improve clang-format-diff help output (PR #73491)

via cfe-commits cfe-commits at lists.llvm.org
Tue Nov 28 01:25:31 PST 2023


serge-sans-paille wrote:

> See below. Seems it's already working as expected without this patch.
> 
> ```
> $ clang-format -version
> clang-format version 17.0.5
> $ clang-format-diff.py foo
> usage: clang-format-diff.py [-h] [-i] [-p NUM] [-regex PATTERN] [-iregex PATTERN]
>                             [-sort-includes] [-v] [-style STYLE]
>                             [-fallback-style FALLBACK_STYLE] [-binary BINARY]
> clang-format-diff.py: error: unrecognized arguments: foo
> $ ln -s clang-format-diff.py cfd
> $ cfd foo
> usage: cfd [-h] [-i] [-p NUM] [-regex PATTERN] [-iregex PATTERN] [-sort-includes] [-v]
>            [-style STYLE] [-fallback-style FALLBACK_STYLE] [-binary BINARY]
> cfd: error: unrecognized arguments: foo
> ```

try with `clang-format-diff.py --help` vs `cfd --help` ;-)

https://github.com/llvm/llvm-project/pull/73491


More information about the cfe-commits mailing list