[llvm-branch-commits] [llvm] [compiler-rt] [clang] [libc] [flang] [clang-tools-extra] [OptTable] Make new lines in help text respect indentation (PR #74880)

Andres Villegas via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Tue Dec 12 10:49:20 PST 2023


avillega wrote:

> > Note the "-" at the beginning of the help text in the new version,
> > it was added to clearly separate the HelpText of the different
> > options.
> 
> > Taking a step back, I'm not sure the addition of the dash has anything to do with the main purpose of this PR, and I'm a little worried people will not spot that this PR is adding it. I personally have no issue with that part of the change, but I wonder if others wouldn't want it?
> 
> I think `-` in `--help` messages is (very) uncommon. Many programs (`cat, node, gcc, as, 7z, ...`) don't use `-`.

I will remove it. But I added it for two reasons:
- I wanted a way to clearly spot the beginning of the help text of an option given that new lines will be indented at the same level as the first line of the help text, it is more difficult to clearly see the start and end of the help text for an specific option.
- The help text generated by llvm::cl uses the `- ` to separate the help text of each option so I was trying to do something similar to what many llvm tools still do.

 

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


More information about the llvm-branch-commits mailing list