[cfe-commits] [patch] Format ObjC @interface

Nico Weber thakis at chromium.org
Wed Jan 9 10:18:02 PST 2013


On Wed, Jan 9, 2013 at 9:58 AM, Jordan Rose <jordan_rose at apple.com> wrote:
> Obviously iterative refinement is fine, and this isn't a commit blocker, but categories and protocols conventionally have spaces before and after the parens / angle brackets.

I added FIXMEs for this.

>
> (references:
> http://developer.apple.com/library/mac/#documentation/Cocoa/Conceptual/ProgrammingWithObjectiveC/CustomizingExistingClasses/CustomizingExistingClasses.html#//apple_ref/doc/uid/TP40011210-CH6-SW2
> http://developer.apple.com/library/mac/#documentation/Cocoa/Conceptual/ProgrammingWithObjectiveC/WorkingwithProtocols/WorkingwithProtocols.html#//apple_ref/doc/uid/TP40011210-CH11-SW1
> )
>
> Also, can you add some test cases with multiple methods, just in case?

Sure, done. I added a test for an empty interface too.

Thanks for taking a look!

>
> Thanks for doing this!
> Jordan
>
>
> On Jan 9, 2013, at 9:44 , Nico Weber <thakis at chromium.org> wrote:
>
>> Hi,
>>
>> the attached patch adds formatting for @interface. There's likely some
>> polishing left to do, but it's a huge step up from the current
>> behavior (putting everything in an @interface on a single line if
>> there are no ivars). Ok to commit?
>>
>> Even if you don't know Objective-C, looking at the included tests
>> should be enough to give you an idea of what's going on.
>>
>> Nico
>> <clang-format-objcinterface.patch>_______________________________________________
>> cfe-commits mailing list
>> cfe-commits at cs.uiuc.edu
>> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: clang-format-objcinterface.patch
Type: application/octet-stream
Size: 6476 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20130109/59b18f86/attachment.obj>


More information about the cfe-commits mailing list