[PATCH] D12492: [Clang-Format] Add AlwaysBreakBeforeElse and AlwaysBreakBeforeCatch Style to avoid cuddled else/catch

Daniel Jasper via cfe-commits cfe-commits at lists.llvm.org
Thu Sep 17 02:06:38 PDT 2015


djasper added a comment.

Please upload a patch with full file context.


================
Comment at: docs/ClangFormatStyleOptions.rst:247
@@ -246,1 +246,3 @@
 
+**AlwaysBreakBeforeElse** (``bool``)
+  If ``true``, always break before ``else``.
----------------
Hm, I think these should be grouped in some way and interact with BreakBeforeBraces.

I theory, I'd like to have a lot of different flags and make BreakBeforeBraces select specific presents for them. However, maybe we can put all the brace breaking options together in some nice way (don't have a very good idea yet).

Not saying that you need to do all of this, but pulling these two options out from the other BreakBeforeBraces options seems a little undesirable. They essentially also just define what we do around braces.


http://reviews.llvm.org/D12492





More information about the cfe-commits mailing list