Some points on clang-format usage

Stephan Bergmann sbergman at redhat.com
Fri Nov 17 10:16:13 UTC 2017


On 11/17/2017 10:54 AM, Miklos Vajna wrote:
> Thanks for mentioning this. I also noticed something similar with
> initializer lists, where
> 
> Foo::Foo()
>      : foo(1), // foo
>        bar(2) // bar
> {
> }
> 
> gets reformatted to:
> 
> Foo::Foo()
>      : foo(1)
>      , // foo
>      bar(2) // bar
> {
> }
> 
> but the ideal form is probably
> 
> Foo::Foo()
>      : foo(1) // foo
>      , bar(2) // bar
> {
> }
> 
> instead.

...which might be reason enough to still revisit the .clang-format rule 
that causes leading commas, if that wrecks such havoc with comments?


More information about the LibreOffice mailing list