[llvm-bugs] [Bug 31906] New: ObjC formatting: bias towards breaking between selector and arguments

via llvm-bugs llvm-bugs at lists.llvm.org
Wed Feb 8 13:59:34 PST 2017


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

            Bug ID: 31906
           Summary: ObjC formatting: bias towards breaking between
                    selector and arguments
           Product: clang
           Version: unspecified
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: normal
          Priority: P
         Component: Formatter
          Assignee: unassignedclangbugs at nondot.org
          Reporter: dcheng at google.com
                CC: djasper at google.com, klimek at google.com,
                    llvm-bugs at lists.llvm.org
    Classification: Unclassified

Here's the code before formatting:

  [destWindow setCollectionBehavior:
      NSWindowCollectionBehaviorMoveToActiveSpace];

  item->menu_item.reset(
      [[NSMenuItem alloc] initWithTitle:base::SysUTF16ToNSString(title)
                                 action:nil
                          keyEquivalent:@""]);

Here's the code after formatting:

   [destWindow
       setCollectionBehavior:NSWindowCollectionBehaviorMoveToActiveSpace];

  item->menu_item.reset([[NSMenuItem alloc]
      initWithTitle:base::SysUTF16ToNSString(title)
             action:nil
      keyEquivalent:@""]);


Here's how it ought to look:

  [destWindow setCollectionBehavior:
      NSWindowCollectionBehaviorMoveToActiveSpace];

  item->menu_item.reset(
      [[NSMenuItem alloc] initWithTitle:base::SysUTF16ToNSString(title)
                                 action:nil
                          keyEquivalent:@""]);

-- 
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/20170208/126bb0d2/attachment.html>


More information about the llvm-bugs mailing list