LLVM Bugzilla is read-only and represents the historical archive of all LLVM issues filled before November 26, 2021. Use github to submit LLVM bugs

Bug 15349 - Formatter gets priority of objc message send expression linebreaks wrong
Summary: Formatter gets priority of objc message send expression linebreaks wrong
Status: RESOLVED FIXED
Alias: None
Product: clang
Classification: Unclassified
Component: Formatter (show other bugs)
Version: unspecified
Hardware: PC All
: P enhancement
Assignee: Unassigned Clang Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-02-25 07:14 PST by Nico Weber
Modified: 2013-11-07 13:24 PST (History)
2 users (show)

See Also:
Fixed By Commit(s):


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Nico Weber 2013-02-25 07:14:53 PST
trackingArea_ =
        [[NSTrackingArea alloc] initWithRect:frame
                                     options:NSTrackingMouseMoved |
                                             NSTrackingMouseEnteredAndExited |
                                             NSTrackingActiveInActiveApp |
                                             NSTrackingInVisibleRect
                                       owner:self
                                    userInfo:nil];

becomes

    trackingArea_ = [[NSTrackingArea alloc]
        initWithRect:frame
             options:NSTrackingMouseMoved | NSTrackingMouseEnteredAndExited |
        NSTrackingActiveInActiveApp | NSTrackingInVisibleRect
               owner:self
            userInfo:nil];

It should at least attempt to do

    trackingArea_ = [[NSTrackingArea alloc]
        initWithRect:frame
             options:NSTrackingMouseMoved | NSTrackingMouseEnteredAndExited |
                     NSTrackingActiveInActiveApp | NSTrackingInVisibleRect
               owner:self
            userInfo:nil];
Comment 1 Nico Weber 2013-06-24 20:01:04 PDT
This became worse I think.

  base::scoped_nsobject<MCPopupWindow> window(
      [[MCPopupWindow alloc] initWithContentRect:ui::kWindowSizeDeterminedLater
                                       styleMask:NSBorderlessWindowMask |
                                                 NSNonactivatingPanelMask
                                         backing:NSBackingStoreBuffered
                                           defer:YES]);

now becomes

  base::scoped_nsobject<MCPopupWindow> window(
      [[MCPopupWindow alloc] initWithContentRect:ui::kWindowSizeDeterminedLater
                                       styleMask:NSBorderlessWindowMask |
          NSNonactivatingPanelMask backing:NSBackingStoreBuffered defer:YES]);


which is pretty terrible.



Slightly related is this:

    base::scoped_nsobject<NSNumber> directionValue(
        [[NSNumber alloc] initWithInteger:
            writingDirection + NSTextWritingDirectionOverride]);

becomes

    base::scoped_nsobject<NSNumber> directionValue(
        [[NSNumber alloc] initWithInteger:writingDirection +
            NSTextWritingDirectionOverride]);

but the original formatting is better.
Comment 2 Daniel Jasper 2013-11-07 13:24:47 PST
Fixed in r194214.