[llvm-bugs] [Bug 46410] New: clang-format produces non compilable code

via llvm-bugs llvm-bugs at lists.llvm.org
Sun Jun 21 03:50:34 PDT 2020


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

            Bug ID: 46410
           Summary: clang-format produces non compilable code
           Product: clang
           Version: 10.0
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Tooling
          Assignee: unassignedclangbugs at nondot.org
          Reporter: aacid at kde.org
                CC: llvm-bugs at lists.llvm.org

Created attachment 23638
  --> https://bugs.llvm.org/attachment.cgi?id=23638&action=edit
the file that has the problem

If you run clang format over the attached file it will make the code non
compilable

Specially it transforms

for (unsigned int i = 0; i < (nRefSegs + 9) >> 3; ++i) {

into 

for (unsigned int i = 0; i<(nRefSegs + 9)> > 3; ++i) {

breaking the shift operator.


JBIG2Stream.cc:1283:50: error: expected primary-expression before ‘>’ token
 1283 |       for (unsigned int i = 0; i<(nRefSegs + 9)> > 3; ++i) {

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20200621/f502886e/attachment.html>


More information about the llvm-bugs mailing list