[PATCH] D10370: clang-format: Implement AlwaysBreakAfterDeclarationReturnType.

Zachary Turner via cfe-commits cfe-commits at lists.llvm.org
Fri Dec 11 15:03:38 PST 2015


zturner added a subscriber: zturner.
zturner added a comment.

What needs to happen for this to go in?  If I understand correctly, it is either:

1. Add a new option `TreatDeclarationsLikeDefinitions`
2. Merge this option into `AlwaysBreakAfterDefinitionReturnType` and make it an enum with 5 values.

In theory I think option 2 is the best, but are you concerned about backwards compatibility?  It breaks anyone already using `AlwaysBreakAfterDefinitionReturnType` and forces them to update their style files.  Is this an important consideration?

I don't really like option 1 because then we are tied to treating declarations like definitions for all current and future options including ones we haven't imagined yet.  That might not be the best choice.

Let me know what to do, and I will finish out this patch if strager won't.


http://reviews.llvm.org/D10370





More information about the cfe-commits mailing list