[cfe-dev] clang-format: Return type in its own line for function definitions
Damian Lezama
Damian.Lezama at riverbed.com
Fri Sep 26 05:42:05 PDT 2014
I’ll take a look and see if I can contribute it when I have some time. For now I’ll try to push this as it is (with break after type enabled) and see what happens, I’m sure the benefits of automatic formatting overweight the small issues I’m finding. Thanks!
From: Daniel Jasper [mailto:djasper at google.com]
Sent: Friday, September 26, 2014 1:04 AM
To: Damian Lezama
Cc: Eli Bendersky; cfe-dev at cs.uiuc.edu
Subject: Re: [cfe-dev] clang-format: Return type in its own line for function definitions
There is no option to control what you are looking for yet. If you want to contribute one, you can roughly look at how the "Inline" mode for AllowShortFunctionsOnASingleLine is implemented.
Cheers,
Daniel
On Fri, Sep 26, 2014 at 4:15 AM, Damian Lezama <Damian.Lezama at riverbed.com> wrote:
> There's the AlwaysBreakAfterDefinitionReturnType style option. It (along with the others) is documented at: http://clang.llvm.org/docs/ClangFormatStyleOptions.html
That option doesn’t do what I need, because it also adds the break if the function is defined inside the class declaration, so I get this:
class A
{
int
a()
{
}
int b();
}
_______________________________________________
cfe-dev mailing list
cfe-dev at cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
More information about the cfe-dev
mailing list