| Issue |
55487
|
| Summary |
[clang-format]: no space before trailing comment
|
| Labels |
new issue
|
| Assignees |
|
| Reporter |
igagis
|
# to reproduce
`.clang-format`
```yaml
---
AlignAfterOpenBracket: BlockIndent
AlignArrayOfStructures: Right
BinPackArguments: 'false'
ColumnLimit: '120'
ContinuationIndentWidth: '1'
IndentWidth: '1'
Language: Cpp
SpacesBeforeTrailingComments: '1'
SpacesInLineCommentPrefix:
Minimum: 1
Maximum: -1
Standard: Latest
TabWidth: '1'
UseCRLF: 'false'
UseTab: ForContinuationAndIndentation
...
```
`main.cpp`:
```cpp
type tree( //
2,
{ // comment
tree(3, {78, 89, 96}),
tree(4, {32, 64, 128}),
tree(42, {98, 99, 100})
}
);
```
# expected result
formatting is not changed
# actual result
```cpp
type tree( //
2,
{// comment
tree(3, {78, 89, 96}),
tree(4, {32, 64, 128}),
tree(42, {98, 99, 100})}
);
```
The space before `// comment` is removed
# version
```console
$ clang-format --version
Debian clang-format version 15.0.0-++20220513071846+693758b28295-1~exp1~20220513071937.249
```
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs