Issue 152267
Summary clang-format doesn't change ragged indentation of ternary _expression_ containing braced initializers
Labels clang-format
Assignees
Reporter jacobsa
    If I provide this input, clang-format doesn't change it:

```c++
void Foo() {
  const std::optional o =
        some_condition ?
 std::optional<Foo>{
                     some_arg,
         } : std::nullopt;
}
```

Ideally it would be formatted something like this:

```c++
void Foo() {
  const std::optional o =
 some_condition
        ? std::optional<Foo>{
              some_arg,
 }
        : std::nullopt;
}
```
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to