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

            Bug ID: 38872
           Summary: Unexpected break before lessless if it is between two
                    strings
           Product: clang
           Version: 6.0
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Formatter
          Assignee: unassignedclangb...@nondot.org
          Reporter: jzpigtc4...@0box.eu
                CC: djas...@google.com, kli...@google.com,
                    llvm-bugs@lists.llvm.org

$ echo -e 'void fu(void) {\ncout << "A" << "B" << "C" << D << "E" << "F" <<
"G"\n}' | clang-format -style="{BasedOnStyle: LLVM, AlignAfterOpenBracket:
DontAlign, AlignOperands: false}"
void fu(void) {
  cout << "A"
       << "B"
       << "C" << D << "E"
       << "F"
       << "G"
}

clang-format inserts an (unwanted) break before a lessless (stream insertion)
operator if (and only if) it is between two string literals. Why? Is there any
intention or rationale? (ColumnLimit cannot be a cause.)

Moreover the lessless-es get aligned, despite that no alignment is allowed.

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

Reply via email to