r236851 - clang-format: Several improvements around formatting braced lists.
Daniel Jasper
djasper at google.com
Mon May 11 06:39:26 PDT 2015
Fixed in r236992. Sorry if you have to change polly back..
On Fri, May 8, 2015 at 5:23 PM, Tobias Grosser <tobias at grosser.es> wrote:
> On 05/08/2015 05:18 PM, Daniel Jasper wrote:
>
>>
>>
>> On Fri, May 8, 2015 at 5:16 PM, Tobias Grosser <tobias at grosser.es
>> <mailto:tobias at grosser.es>> wrote:
>>
>> On 05/08/2015 03:51 PM, Daniel Jasper wrote:
>>
>> Author: djasper
>> Date: Fri May 8 08:51:14 2015
>> New Revision: 236851
>>
>> URL: http://llvm.org/viewvc/llvm-project?rev=236851&view=rev
>> Log:
>> clang-format: Several improvements around formatting braced lists.
>>
>> In particular:
>> * If the difference between the longest and shortest element, we
>> copped
>> out of column format completely. Now, we instead allow to
>> arrange
>> these in a single column, essentially enforcing a
>> one-per-line format.
>> * Allow column layout even if there are braced lists. Especially,
>> if
>> there are many short lists, this can be beneficial. The bad
>> case,
>> where there is a long nested init list is usually caught as
>> we now
>> limit the length difference of the longest and shortest
>> element.
>>
>>
>> Hi Daniel,
>>
>> this change caused the following formatting change in Polly:
>>
>> - Value *Args[] = {SubFn, SubFnParam, NumberOfThreads, LB, UB,
>> Stride};
>> + Value *Args[] = {SubFn,
>> + SubFnParam,
>> + NumberOfThreads,
>> + LB,
>> + UB,
>> + Stride};
>>
>> I will change this in Polly. It might be useful to add some test case
>> that shows that in certain cases we want to format a list in column
>> layout even though it fits a single line.
>>
>>
>> Do we? Do you actually think the new format is better?
>>
>
> I personally would probably just have left the old formatting, but as this
> case does not happen that often and both are readable, I don't have any
> strong opinion on this.
>
> Though, I would like us to choose one formatting to which we will stick to
> in the future. Regarding which one to choose, feel free to take the one you
> like best.
>
> Best,
> Tobias
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20150511/0e6033e9/attachment.html>
More information about the cfe-commits
mailing list