llvm / llvm/llvm-project

[clang-format] Option to insert spaces after `*` of every line of a multi-line comment

Open
#160,264 1 comment 0 reactions 0 assignees View on GitHub
clang-format enhancement
Dominant language
LLVM
Stars
40.5k
Forks
18.7k
PR merge metrics
PR metrics pending

Description

```c
/*This is a multiline comment,
*and this is the next line.
*/
```

Looking for a clang-format option to format this comment into:
```c
/* This is a multiline comment,
* and this is the next line.
*/
```

There is an option ([`SpacesInLineCommentPrefix`](https://clang.llvm.org/docs/ClangFormatStyleOptions.html#spacesinlinecommentprefix)) that does exactly this, but it only works with single-line comments (`//`).

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.