r181187 - Change indentation when breaking after a type.

Tobias Grosser tobias at grosser.es
Fri Jun 21 09:01:13 PDT 2013


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
>>> 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



More information about the cfe-commits mailing list