[PATCH] D22505: clang-format Access Modifier Use Normal Indent

Daniel Jasper via cfe-commits cfe-commits at lists.llvm.org
Mon Jul 25 09:45:53 PDT 2016


djasper added a comment.

Sorry, my bad. I should have replied sooner. I believe we can move further with this seems to be used widely enough (though it really doesn't make sense in my personal opinion ;) ).

My main concern is how we are going to configure this in the long run. This is mostly my bad as I was trying to be too clever with the AccessModifierOffset setting.

I see three options:

1. Roughly go ahead with what you are suggesting, although the option should not be called AccessModifierStandardIndent, as that carries no meaning and actually is far from the "standard" way. Reasonable names that spring to mind are: AccessModifiersCauseAdditionalIndent or (Additional)IndentAfterAccessModifiers.
2. Be even more "clever" with AccessModifierOffset (I can come up with various ways from negative numbers to special numbers, none of them really good).
3. Deprecate AccessModifierOffset and instead use an enum with a few dedicated settings.

Manuel, any thoughts?


https://reviews.llvm.org/D22505





More information about the cfe-commits mailing list