https://bugs.llvm.org/show_bug.cgi?id=45648

            Bug ID: 45648
           Summary: clang-format breaks right shift operators
           Product: clang
           Version: trunk
          Hardware: PC
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Formatter
          Assignee: unassignedclangb...@nondot.org
          Reporter: rmansfi...@gmail.com
                CC: djas...@google.com, kli...@google.com,
                    llvm-bugs@lists.llvm.org, owenpi...@gmail.com

$ 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 (https://github.com/llvm/llvm-project.git 

It appears this regressed in ac67414618df.

commit ac67414618df9fdc24754b05cf438f8f7568f04a
Author: Owen Pan <owenpi...@gmail.com>
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: https://reviews.llvm.org/D66332

    llvm-svn: 369157

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to