Issue 115352
Summary clang-format: Generalize BAS_AlwaysBreak to all delimiter types
Labels clang-format
Assignees
Reporter dabrahams
    The setting  `AlignAfterOpenBracket: AlwaysBreak` eliminates most cases of [endline layout (vertically coupled alignment)](https://softwareengineering.stackexchange.com/a/453510/457643), but unfortunately not all.  For example, when it's set, with a 50-column limit, I get the following:

```c++
template <
    class SomethingLong, class SomethingElse>
void a_long_function_name(
    int x, int y, std::string z,
    std::vector<SomethingLong> q) {
  int a[] = {1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
             1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
             1, 1, 1, 1, 1, 1, 1, 1};
  int b = a_very_long_name
 [some + very + very + long + _expression_ +
       that + causes + wrapping];
}
```

Notice that it isn't applied to initializer lists or subscript expressions.  There should be a way to apply it to everything, to help avoid the problems of needlessly large diffs (and thus merge conflicts) that tend to result.
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to