<html>
    <head>
      <base href="https://bugs.llvm.org/">
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - clang-format Require Clause fails to break correctly when using parenthesis."
   href="https://bugs.llvm.org/show_bug.cgi?id=52401">52401</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>clang-format Require Clause fails to break correctly when using parenthesis.
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>clang
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>13.0
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>PC
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Windows NT
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>C++2a
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>unassignedclangbugs@nondot.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>peeceseven@gmail.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>blitzrakete@gmail.com, erik.pilkington@gmail.com, llvm-bugs@lists.llvm.org, richard-llvm@metafoo.co.uk
          </td>
        </tr></table>
      <p>
        <div>
        <pre>related to: <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - [feature request] requires clause in class templates (Concepts TS)"
   href="show_bug.cgi?id=32165">https://bugs.llvm.org/show_bug.cgi?id=32165</a>
It seems to have some basic formatting that works okay as long as you don't use
parenthesis. If I wrap the Requires clause in parenthesis the whole thing and
the following line will be combined into one line. At least in some of my
testing.
I'm using the ClangFormat built into Clion it appears to be ClangFormat 13.

//start without parenthesis
 template<
    bool nested = true,
    typename lambdaT,
    typename filterT = decltype(default_filter_lambda)>
  requires valid_execute_on_lambda<lambdaT> && valid_filter_lambda<filterT>
  bool
    execute_on(
      const std::initializer_list<std::string_view> &filename,
      lambdaT                                      &&lambda,
      filterT                                      &&filter_lambda = {}) const
  {
    return loop(get_execute_on_lambda<nested>(filename, lambda,
filter_lambda));
  }
//end without.
//start with
template<
    bool nested = true,
    typename lambdaT,
    typename filterT = decltype(default_filter_lambda)>
  requires(valid_execute_on_lambda<lambdaT> &&valid_filter_lambda<filterT>)
bool execute_on(
    const std::initializer_list<std::string_view> &filename,
    lambdaT                                      &&lambda,
    filterT                                      &&filter_lambda = {}) const
  {
    return loop(get_execute_on_lambda<nested>(filename, lambda,
filter_lambda));
  }
//end with
The one below here requires the parathesis because it has two conditions. See
how the function type and function name are forced to be on the same line as
the last condition?
//start another example with two groups of parenthesis
 template<
    bool nested = true,
    ArchiveTypeT... aT,
    typename lambdaT,
    typename filterT = decltype(default_filter_lambda)>
  requires(valid_execute_on_lambda<lambdaT> &&valid_filter_lambda<filterT>)
    && (sizeof...(aT) > 0) bool execute_on(
      const std::initializer_list<std::string_view> &filename,
      lambdaT                                      &&lambda,
      filterT                                      &&filter_lambda = {}) const
  {
    return specify<aT...>(
      get_execute_on_lambda<nested>(filename, lambda, filter_lambda));
  }
};
//end of another example.</pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>