Issue 79176
Summary [clang-format] AlignAfterOpenBracket: BlockIndent not applied to control structures
Labels
Assignees
Reporter flyx
    The documentation says that `AlignAfterOpenBracket`

> only applies to braced initializer lists (when Cpp11BracedListStyle is true) **and parentheses**.

However, it doesn't apply to control structures in C++ even though they use parentheses. Instead of the current result of clang-format:

```c++
for (int someIterationValueWithLongName = 1;
     someIterationValueWithLongName < 10;
 someIterationValueWithLongName++) {
    // ...
}
```

based on the documentation, I expected to get this:

```c++
for (
    int someIterationValueWithLongName = 1;
    someIterationValueWithLongName < 10;
    someIterationValueWithLongName++
) {
    // ...
}
```

Same goes for `if` and `while`.
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to