llvm / llvm/llvm-project

[clang-format] Improper formatting of `operator*`

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

Description

Currently with LLVM's default format settings we get the following results:

```C++

std::complex a;
std::complex b;

auto c = a * b; // correctly formated by clang-format
a* b; // incorrectly formatted, the * is attached to the first argument
```

The desired result is to get consistent formatting:

```C++

std::complex a;
std::complex b;

auto c = a * b; // OK
a * b; // OK
```

An actual screenshot:

Image

Image

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.