[PATCH] D32525: [clang-format] Add SpaceBeforeColon option

Francois Ferrand via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu May 18 07:03:48 PDT 2017


Typz added a comment.

I checked the code of POCO, and it indeed follows this convention (though there does not seem to be any C++11 for loop indeed).
We also use this style at our company.

> Also see my comment.

I could not find your comment... can you please re-post?

> It's very hard to even name this option without it being confusing to users.

What do you mean? 'space before colon' seems quite explicit to me... The only thing I can think of is that it does not apply to ternary operator and labels (though I don't think that would be misleading for user); do you think it should be a flag with different modes, similar to BreakBeforeBinaryOperators (e.g. Never, LabelsAndOperators, Always) ?


https://reviews.llvm.org/D32525





More information about the cfe-commits mailing list