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

    <tr>
        <th>Summary</th>
        <td>
            [clang-format] Continuation indent of requires-expression should be configurable
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
      </td>
    </tr>

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

    <tr>
      <th>Reporter</th>
      <td>
          Vigilans
      </td>
    </tr>
</table>

<pre>
    In clang-13, a concept definition with requires-expression will be formatted like this:
```cpp
template <typename EnvT>
concept Env = requires(EnvT&& env) {
    { step(env) } -> std::convertible_to<int>;
};
```
But after commits in https://reviews.llvm.org/D113319, above code will be formatted to:
```cpp
template <typename EnvT>
concept Env = requires (EnvT&& env) {
                  { step(env) } -> std::convertible_to<int>;
              };
```
After some investigation, it reveals that the difference was rooted in following code:
https://github.com/llvm/llvm-project/blob/24d6cc688fb56eff1a5f2267c238855d048f9982/clang/lib/Format/ContinuationIndenter.cpp#L1399-L1400

It unconditionally sets the indentation to be aligned with `requires` keyword. After removing it and recompile clang-format, the code is formatted as what clang-13 does:
```cpp
template <typename EnvT>
concept Env = requires (EnvT&& env) {
    { step(env) } -> std::convertible_to<int>;
};
```
These two indentations are just different style preferences, therefore should be made configurable in `.clang-format` file.

@HazardyKnusperkeks 
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJy1lE1v4zYQhn-NdCFsyKSkiAcdkniDBt3jYq8LShza3FCkSlJ2vb9-h7TjOMUWbYFGEETxa_jOMzMcnDz1z5aMRtjdasMK-kgEGZ0dYY5EgtJWR-0sOeq4Jx7-WLSHsII_Z2zCecIYMgBRzk8iRpDE6Bcgca9Dwe6LaltU90Vbnd9xns8jEabZiAikYI_xNIMVE5BP9vClYJ_OK1414CAu2l7PLmiX19EWXwL2UFBOiruH8y6CD3ZIiDDjyuv0lqzQMg7LJIol6wfwUQ8GvkWHIrSN6Wh2sYM73v5f1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