[PATCH] D33447: clang-format: add option to merge empty function body

Francois Ferrand via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri May 26 07:01:18 PDT 2017

Typz added a comment.

In https://reviews.llvm.org/D33447#765610, @djasper wrote:

> I think it's just wrong that WebKit inherits this. The style guide explicitly says that this is wrong:
>   MyOtherClass::MyOtherClass() : MySuperClass() {}

I think this exemple applies to constructors only.
Looking at webkit code, there are many shortl functions which are indeed formatted on a single line (at least 22097 occurences, actually)

> So I still think we can make this work with the existing options without regressing a behavior that anyone is relying on.


More information about the cfe-commits mailing list