r181187 - Change indentation when breaking after a type.

Manuel Klimek klimek at google.com
Fri Jun 21 10:28:38 PDT 2013


Submitted fix as r184563.

Note that I'll be out the next 2 weeks, and Daniel's still out next week,
so make sure to ping Alex if anything is high prio.

Thx!


On Fri, Jun 21, 2013 at 7:06 PM, Manuel Klimek <klimek at google.com> wrote:

> I'm on it. Sorry that it got lost for so loing.
>
>
> On Fri, Jun 21, 2013 at 6:01 PM, Tobias Grosser <tobias at grosser.es> wrote:
>
>> Copying Daniel, Manuel and Reid.
>>
>>
>> On 06/21/2013 08:27 AM, Tobias Grosser wrote:
>>
>>> On 05/08/2013 03:58 PM, David Blaikie wrote:
>>>
>>>> On Mon, May 6, 2013 at 1:27 AM, Daniel Jasper <djasper at google.com>
>>>> wrote:
>>>>
>>>>> Author: djasper
>>>>> Date: Mon May  6 03:27:33 2013
>>>>> New Revision: 181187
>>>>>
>>>>> URL: http://llvm.org/viewvc/llvm-**project?rev=181187&view=rev<http://llvm.org/viewvc/llvm-project?rev=181187&view=rev>
>>>>> Log:
>>>>> Change indentation when breaking after a type.
>>>>>
>>>>> clang-format did not indent any declarations/definitions when breaking
>>>>> after the type. With this change, it indents for all declarations but
>>>>> does not indent for function definitions, i.e.:
>>>>>
>>>>> Before:
>>>>> const SomeLongTypeName&
>>>>> some_long_variable_name;
>>>>> typedef SomeLongTypeName
>>>>> SomeLongTypeAlias;
>>>>> const SomeLongReturnType*
>>>>> SomeLongFunctionName();
>>>>> const SomeLongReturnType*
>>>>> SomeLongFunctionName() { ... }
>>>>>
>>>>> After:
>>>>> const SomeLongTypeName&
>>>>>      some_long_variable_name;
>>>>> typedef SomeLongTypeName
>>>>>      SomeLongTypeAlias;
>>>>> const SomeLongReturnType*
>>>>>      SomeLongFunctionName();
>>>>>
>>>>
>>>> No judgment on how good/bad this is, but this particular case seems
>>>> inconsistent with LLVM's defacto standard style. Function declarations
>>>> still don't tend to have the indentation for the function name. (I'm
>>>> looking at llvm/include/llvm/DIBuilder.h at the moment)
>>>>
>>>
>>
>> This was also reported as llvm.org/PR16157.
>>
>> The change is in fact really disturbing as all code in LLVM uses the
>> previous style and we get now a lot of noise and inconsitency in files
>> that are formatted with the after version. Making clang-format a whole
>> less useful for me and other people [1].
>>
>> This is now in since six weeks without feedback to the people that
>> raised the very same concern right at the point when this commit
>> happened. Daniel or Manuel, would it be possible to revert this change
>> for LLVM style?
>>
>> Cheers,
>> Tobi
>> [1] http://permalink.gmane.org/**gmane.comp.compilers.clang.**scm/74975<http://permalink.gmane.org/gmane.comp.compilers.clang.scm/74975>
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20130621/09bd6d89/attachment.html>


More information about the cfe-commits mailing list