[clang] [clang-format] Add `SpaceInComments` option to control spacing around `/* */` (PR #162105)
via cfe-commits
cfe-commits at lists.llvm.org
Wed Nov 26 23:07:12 PST 2025
owenca wrote:
> * Add a clang-format `SpaceInComments` option to control spaces right after `/*` and right before `*/` in block comments.
We should name the option `SpacesInComments`, similar to `SpacesInAngles` and other `SpacesIn...` options.
> * The option has four per-position settings inside `SpaceInComments`. Each setting accepts `Always`, `Never`, or `Leave`.
>
> * `AfterOpeningComment` and `BeforeClosingComment` for regular block comments.
> * `AfterOpeningParamComment` and `BeforeClosingParamComment` for inline parameter comments such as `/*param=*/`.
When I suggested "to add a single `SpacesInBlockComment` option", I didn't mean to add it on top of those suboptions. Instead, `SpacesInBlockComment` should function like `SpacesInAngles` for example.
https://github.com/llvm/llvm-project/pull/162105
More information about the cfe-commits
mailing list