r181700 - Implements brace breaking styles.

Chandler Carruth chandlerc at google.com
Mon May 13 07:38:01 PDT 2013


On Mon, May 13, 2013 at 4:36 PM, Manuel Klimek <klimek at google.com> wrote:

> On Mon, May 13, 2013 at 4:28 PM, Chandler Carruth <chandlerc at google.com>wrote:
>
>>
>> On Mon, May 13, 2013 at 2:51 PM, Manuel Klimek <klimek at google.com> wrote:
>>
>>> Stroustrup brace breaking style:
>>> namespace a {
>>> class A {
>>>   void f()
>>>   {
>>>     if (x) {
>>>       f();
>>>     } else {
>>>
>>
>> Err, the really fundamental aspect to the stroustrup style is breaking
>> before the else.
>>
>> http://en.wikipedia.org/wiki/Indent_style#Variant:_Stroustrup
>>
>> I'm not advocating supporting everything here, just saying that if you
>> call it Stroustrup style, it had better match. ;]
>>
>
> I implemented Stroustrup style according to the tool "astyle", which is
> the documented style checker for multiple projects I found. Also, as far as
> I can tell, this is exactly what we'll need for Webkit formatting.
>

Interesting. Bjarne's own FAQ seems to agree, so I'm willing to say the
wikipedia article is wrong. Someone should probably update it.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20130513/8f2767c2/attachment.html>


More information about the cfe-commits mailing list