[cfe-commits] r173457 - in /cfe/trunk: lib/Format/Format.cpp unittests/Format/FormatTest.cpp
Jordan Rose
jordan_rose at apple.com
Fri Jan 25 09:12:00 PST 2013
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.)
More information about the cfe-commits
mailing list