[clang] [clang-format] Add `SpaceInComments` option to control spacing around `/* */` (PR #162105)

via cfe-commits cfe-commits at lists.llvm.org
Sun Nov 30 00:14:54 PST 2025


owenca wrote:

> For the actual behavior, my current thought is to apply this option only to “ordinary” block comments and to treat `/*param=*/`-style parameter comments and documentation comments (`/** ... */`, `/*! ... */`, etc.) as out of scope, so they remain unchanged regardless of the setting.

Yes, that's what I had in mind, as mentioned at the end of my [comment](https://github.com/llvm/llvm-project/pull/162105#issuecomment-3569277694) above. In fact, this option should only affect real block comments. For example, embedded and trailing comments should be excluded.

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


More information about the cfe-commits mailing list