r212591 - clang-format: Revamp function declaration/definition indentation.

Daniel Jasper djasper at google.com
Wed Jul 9 01:47:43 PDT 2014


Yes, this is intended and I actually don't think that it is such a big
difference. Multiline variable declaration that are broken after the type
are actually reasonably rare.

Happy, to take a vote on this though..


On Wed, Jul 9, 2014 at 10:42 AM, Tobias Grosser <tobias at grosser.es> wrote:

> On 09/07/2014 09:50, Daniel Jasper wrote:
>
>> Author: djasper
>> Date: Wed Jul  9 02:50:33 2014
>> New Revision: 212591
>>
>> URL: http://llvm.org/viewvc/llvm-project?rev=212591&view=rev
>> Log:
>> clang-format: Revamp function declaration/definition indentation.
>>
>> Key changes:
>> - Correctly (well ...) distinguish function declarations and variable
>>    declarations with ()-initialization.
>> - Don't indent when breaking function declarations/definitions after the
>>    return type.
>> - Indent variable declarations and typedefs when breaking after the
>>    type.
>>
>> This fixes llvm.org/PR17999.
>>
>
> I think this commit changed the formatting of global command line
> declarations in LLVM:
>
> static cl::opt<bool>
> DetectScopsWithoutLoops("polly-detect-scops")
>
> became:
>
> static cl::opt<bool>
>     DetectScopsWithoutLoops("polly-detect-scops")
>
> and
>
> static cl::opt<std::string>
> OnlyFunction("polly-only-func")..
>
> became
>
>
> static cl::opt<std::string> OnlyFunction(
>     "polly-only-func")
>
> I personally was very happy with the previous formatting. Was this change
> intended?
>
> As this introduces a large difference compared to clang-format-3.4, I
> would prefer to keep the existing style.
>
> Tobias
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20140709/b89b0f07/attachment.html>


More information about the cfe-commits mailing list