<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 breaks right shift operators"
   href="https://bugs.llvm.org/show_bug.cgi?id=45648">45648</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>clang-format breaks right shift operators
          </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>enhancement
          </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>rmansfield@gmail.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>djasper@google.com, klimek@google.com, llvm-bugs@lists.llvm.org, owenpiano@gmail.com
          </td>
        </tr></table>
      <p>
        <div>
        <pre>$ cat cf.c
void foo(int x) { 
 for (unsigned int i = 0; i < x >> 1; i++) { }
}
$ ./bin/clang-format -verbose  cf.c | clang -c -xc -
Formatting cf.c
<stdin>:2:33: error: expected expression
  for (unsigned int i = 0; i<x> > 1; i++) {
                                ^
1 error generated.

$ ./bin/clang-format --version
clang-format version 11.0.0 (<a href="https://github.com/llvm/llvm-project.git">https://github.com/llvm/llvm-project.git</a> 

It appears this regressed in ac67414618df.

commit ac67414618df9fdc24754b05cf438f8f7568f04a
Author: Owen Pan <<a href="mailto:owenpiano@gmail.com">owenpiano@gmail.com</a>>
Date:   Fri Aug 16 21:49:17 2019 +0000

    [clang-format] Fix the bug that joins template closer and > or >>

    Also fixes a buggy test case.

    See PR42404

    Differential Revision: <a href="https://reviews.llvm.org/D66332">https://reviews.llvm.org/D66332</a>

    llvm-svn: 369157</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>