Some points on clang-format usage

Stephan Bergmann sbergman at
Fri Nov 17 14:48:43 UTC 2017

On 11/17/2017 12:19 PM, Miklos Vajna wrote:
> On Fri, Nov 17, 2017 at 11:16:13AM +0100, Stephan Bergmann <sbergman at> wrote:
>> ...which might be reason enough to still revisit the .clang-format rule that
>> causes leading commas, if that wrecks such havoc with comments?
> I think BreakConstructorInitializersBeforeComma is the relevant key.
> Setting it to false would not be controversial, it would just mean we
> leave that area alone, I believe.

So among 
BreakConstructorInitializers:{BeforeColon,BeforeComma,AfterColon} and 
ConstructorInitializerAllOnOneLineOrOnePerLine:{false,true} there 
appears to be no setting that both (a) consistently places each 
initializer on a line of its own (the current behaviour IIUC; beneficial 
for small diffs when modifying an initializer list) and (b) puts the 
comma after the initializer (which would be beneficial for preserving 
trailing comment placement).


More information about the LibreOffice mailing list