<table border="1" cellspacing="0" cellpadding="8">
    <tr>
        <th>Issue</th>
        <td>
            <a href=https://github.com/llvm/llvm-project/issues/76820>76820</a>
        </td>
    </tr>

    <tr>
        <th>Summary</th>
        <td>
            Format ellipsis from fold expressions differently from ordinary
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            clang-format
      </td>
    </tr>

    <tr>
      <th>Assignees</th>
      <td>
      </td>
    </tr>

    <tr>
      <th>Reporter</th>
      <td>
          ilya-biryukov
      </td>
    </tr>
</table>

<pre>
    Current formatting:
```cpp
void main() {
    ([&final_url, &candidate] {
 FooBarBaz<Url>(candidate, final_url);
        return final_url != std::nullopt;
    }() ||
     ...);
}
```
Suggested formatting:
```cpp
([&final_url, &candidate] {
 FooBarBaz<Url>(candidate, final_url);
    return final_url != std::nullopt;
}() || ...);
```

Currently, the ellipsis is aligned to the same indent as the first argument of `||`.
This would be reasonable if `...` was a normal expression, but because `...` has a special meaning in that position and is always fixed length (unlike arbitrary expressions), it seems reasonable to keep it at the same line as `||` to make comprehending the code easier. In particular, we avoid the need to scan the next line to uncover that it's a fold expression.

I wonder what other people think and whether it's a useful change to clang-format by default/under a new option?
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJy8VMuOq0YQ_ZpmUxoEjV8sWMzYsXTXSdZRQRdQcdON-jEe5-ujhtGYudkkm1jIlut16pyqAr3nwRA1Yv8m9pcMYxita1g_8KVl94g3-561Vj2ac3SOTIDeuglDYDOI6lUUF1G8ikOxPt08r5Z3ywomZCPkScgaxPFtdQAAJNv-TchDzwb1H9FpIc8g5KFDo1hhILG_bFKu1r6he8O_RHX-3WlR_SLk6Rkrz7ApVItqA5U-jkJ05hkDQpaiuoAPKjGoXk3U2s7hW6I4Xr5aP6fnWTLP8y1Mivyuwvr31zgM5AOpf6fY_yjKfxbkZzH-IcF35uv3577oR-oljASkNc-ePbAH1GnrFAS7uDxOBGxU2i_0i6ln5wOgG-KUrLaHVH-dxaHIV4zfRvZwt1EraAkcobcGW03AS3hq81DAHT0gmDQFDfQxO_KerUl9tTFASx1GT5uEcUnwM3WMGiZCw2YANhBGDDBbz4GtATRq5XLHh4eeP0iBJjOEMa14NJpvBOhaDg7dY4Psk3jyDBzAE01-23mwcCOakw_DUxzNhpI0WxFS7IQ3gs5Os6ORjEp9ppzOKgJCz-Ry-GFgRhe4ixpdwr0T4HKhKdTQOgffofk0fIQVL1iIprPv5FbmHIQ8Jml6q9WGT76d-w-4W6PIwT2l2DCSg5nsnLiNbG6LbPeRFsdXxeipjxq6Ec2wAHcazfCyng60D1DUY9RByGtcqiMYuoOd0yREdc1UU6m6qjGjpjwWO1nLXVlmY4Ok1P5Ylqeu3VF3KErqK1lgXbfFSRXlKeNGFnJXlEVV7qqqKnKsd-Wh3R97ta87VaHYFTQh61zr9ym3bsjY-0jN8XCSRaaxJe2X16eU26aFlOmF6pqU9tLGwYtdodkH_ywUOGhqrivJr_vonZ1-ltiD4r6n9aLWCOsUG3SPLDrdjCHMPl2vvAp5HTiMsc07Owl5TWifPy-zs39Sl1RcOHghrwuNvwMAAP__jtnjxw">