Submitted as r214857, thank you!
On Fri, May 9, 2014 at 2:20 PM, Jarkko Hietaniemi <[email protected]> wrote: > I wanted cuddled braces for 'if' and 'else' (just like the default style > gives) *except* that I wanted my 'else' keywords themselves "uncuddled", > that is, inserting a break before the 'else': > > if (a) { > a(); > } > else { > b(); > } > > This style makes the 'else' stand out better, instead of being hidden in > > } else { > > while still giving the relatively tighter vertical packing of lines. > > This looks to be part of the "Stroustrup" style. > > However, I'm a little dubious about changing this because so far it hasn't > been part of the Stroustrup behavior... that is, existing users of > BS_Stroustrup will have their code look different when they re-format. > > But http://www.stroustrup.com/Programming/PPP-style-rev3.pdf very clearly > "uncuddles" the 'else', while the braces of both 'else' and 'if' are > "cuddled", as a proper K&R descendant should. > > In case changing the behavior of BS_Stroustrup is deemed too big a change, > I'm also including an alternate version of the change which adds a new > top-level option for this, AlwaysBreakBeforeElse. > > Patches attached. > > > > _______________________________________________ > cfe-commits mailing list > [email protected] > http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits > >
_______________________________________________ cfe-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
