Issue 97818
Summary [clang-format] feature request/question: General bracket alignment rule
Labels clang-format
Assignees
Reporter SamCoutteauHybrid
    In our code base we have a simple rule that any bracket ( `()`, `[]`, `{}`, `<>` ) pair should either be an the same row or the same column.

Thus

```cpp
if(){}
```

or

```cpp
if
(
)
{
}
```

It seems like this can currently be achieved for most cases of `{}` however for the others ( `()`, `<>`, `[]` ) it does not seem possible the enforce this rule. clang format seems to at best produce:

```cpp
if(
)
{
}
```

_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to