[llvm-bugs] [Bug 24887] New: Feature request: Option to disallow breaking the line on assignment operator

via llvm-bugs llvm-bugs at lists.llvm.org
Sun Sep 20 11:03:34 PDT 2015


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

            Bug ID: 24887
           Summary: Feature request: Option to disallow breaking the line
                    on assignment operator
           Product: clang
           Version: trunk
          Hardware: PC
                OS: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: Formatter
          Assignee: unassignedclangbugs at nondot.org
          Reporter: t at sharklasers.com
                CC: djasper at google.com, klimek at google.com,
                    llvm-bugs at lists.llvm.org
    Classification: Unclassified

There's the option BreakBeforeBinaryOperators that can take the Argument
NonAssignment.
And instead of breaking before assignment the like breaks after. The code looks
like this:

NSString* line =
    [NSString stringWithFormat:@"%f\t%f\r\n", devData.timestamp, angle];

auto minmaxEl
    = minmax_element(processed.begin<uchar>(), processed.end<uchar>());


It would be nice to be able to prevent breaking on assignment to get formatting
like:

NSString* line = [NSString stringWithFormat:@"%f\t%f\r\n",
                                            devData.timestamp, angle];

auto minmaxEl = minmax_element(processed.begin<uchar>(),
                               processed.end<uchar>());

-- 
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/20150920/91027ebd/attachment.html>


More information about the llvm-bugs mailing list