[cfe-commits] r173457 - in /cfe/trunk: lib/Format/Format.cpp unittests/Format/FormatTest.cpp
Nico Weber
thakis at chromium.org
Fri Jan 25 10:30:28 PST 2013
On Fri, Jan 25, 2013 at 9:12 AM, Jordan Rose <jordan_rose at apple.com> wrote:
>
> On Jan 25, 2013, at 7:43 , Daniel Jasper <djasper at google.com> wrote:
>
> > Author: djasper
> > Date: Fri Jan 25 09:43:32 2013
> > New Revision: 173457
> >
> > URL: http://llvm.org/viewvc/llvm-project?rev=173457&view=rev
> > Log:
> > Fix some alignment and line break decisions.
> >
> > This combines two small changes:
> > 1) Put a penalty on breaking after "<"
> > 2) Only produce a hanging indent when parameters are separated by
> > commas.
> >
> > Before:
> > aaaaaaaaaaaaaaaaaaaaaaaa<
> > aaaaaaaaaaaaaaaaa,
> aaaaaaaaaaaaaaaaa>(aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa);
> > aaaaaa(new Aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa(
> > aaaaaaaaaaaaaaaaaaaaaaaaaaaaa));
> >
> > After:
> > aaaaaaaaaaaaaaaaaaaaaaaa<aaaaaaaaaaaaaaaaa, aaaaaaaaaaaaaaaaa>(
> > aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa);
> > aaaaaa(new Aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa(
> > aaaaaaaaaaaaaaaaaaaaaaaaaaaaa));
> >
> > This changes one ObjC test, but AFAICT this is not according to any
> > style guide (neither before nor after). We probably should be aligning
> > on the ":" there according to:
> >
> http://google-styleguide.googlecode.com/svn/trunk/objcguide.xml?showone=Method_Invocations#Method_Invocations
>
> Apple style is the same, except possibly for the long cases. (I think the
> "before" ObjC case is better than the "after" case here, but neither is
> what we want in the long run anyway.)
>
I also think the "before" case is better, but since it too is unusably bad
it doesn't matter much :-) PR14939 tracks formatting selector expressions
correctly.
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20130125/8e32a7bd/attachment.html>
More information about the cfe-commits
mailing list