[clang-format] extra space added within comments that use double asterisks to close
- Dominant language
- LLVM
- Stars
- 40.5k
- Forks
- 18.7k
- PR merge metrics
- PR metrics pending
Description
I'm seeing strange comment formatting behavior with clang-format 21. I've confirmed the problem exists at HEAD (LLVM 23.0.0) as well. Minimal reproducer:
```
# dot-clang-format
ColumnLimit: 80
ReflowComments: true
PenaltyExcessCharacter: 10
```
```
# test.cc
/**
* This test verifies the special code path. It currently exists for code coverage.
**/
void test() {}
```
Note how an extra space is added between "code" and "coverage":
```
$ clang-format --style=file:dot-clang-format test.cc
/**
* This test verifies the special code path. It currently exists for code coverage.
**/
void test() {}
```
This _only_ happens when the close of the comment block uses `**/` (double asterisk). If the block closes with `*/` this behavior does not occur.
Bisection reveals this was introduced with f771d08.
Contributor guide
Assessment
This issue has not been assessed yet.