<html>
    <head>
      <base href="https://llvm.org/bugs/" />
    </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 --- - Combination of BreakBeforeBinaryOperators: All, AlignAfterOpenBracket: AlwaysBreak doesn't handling long template parameter list."
   href="https://llvm.org/bugs/show_bug.cgi?id=30304">30304</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Combination of BreakBeforeBinaryOperators: All, AlignAfterOpenBracket: AlwaysBreak doesn't handling long template parameter list.
          </td>
        </tr>

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

        <tr>
          <th>Version</th>
          <td>trunk
          </td>
        </tr>

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

        <tr>
          <th>OS</th>
          <td>All
          </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>Formatter
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>daphnediane@mac.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>djasper@google.com, klimek@google.com, llvm-bugs@lists.llvm.org
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Created <span class=""><a href="attachment.cgi?id=17217" name="attach_17217" title="Simplified sample code that does not format correctly.">attachment 17217</a> <a href="attachment.cgi?id=17217&action=edit" title="Simplified sample code that does not format correctly.">[details]</a></span>
Simplified sample code that does not format correctly.

When both BreakBeforeBinaryOperators: All and AlignAfterOpenBracket:
AlwaysBreak formatting options are specified clang-format does not wrap really
long template lines.

I've attached a sample file that can show the problem.

The default works:
clang-format --style='{BasedOnStyle: llvm, BreakBeforeBinaryOperators: None,
AlignAfterOpenBracket: Align}' dummy.cxx

Changing BBBO to all but leaving AAOB as default also works.
clang-format --style='{BasedOnStyle: llvm, BreakBeforeBinaryOperators: All,
AlignAfterOpenBracket: Align}' dummy.cxx

Changing AAOB to AlwaysBreak but leaving BBBO as default also works.
clang-format --style='{BasedOnStyle: llvm, BreakBeforeBinaryOperators: None,
AlignAfterOpenBracket: AlwaysBreak}' dummy.cxx

But turning on both at once falls to wrap the line
clang-format --style='{BasedOnStyle: llvm, BreakBeforeBinaryOperators: All,
AlignAfterOpenBracket: AlwaysBreak}' dummy.cxx</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>