LOL.. Very interesting that no additional logic is necessary.

Looks good with a few minor comments.

================
Comment at: docs/ClangFormatStyleOptions.rst:176
@@ -175,1 +175,3 @@
+  * ``BS_KernighanRitchie`` (in configuration: ``KernighanRitchie``)
+    Like ``Attach``, but break before braces on function definitions.
 
----------------
Please generate this with docs/tools/dump_format_style.py. Otherwise, the next 
re-generation of this file will contain unrelated changes.

================
Comment at: include/clang/Format/Format.h:287
@@ +286,3 @@
+    BS_GNU,
+    /// Like \c Attach, but break before braces on named function
+    /// definitions.
----------------
"named"?

Also, maybe "..., but only break ..."?

================
Comment at: unittests/Format/FormatTest.cpp:8069
@@ +8068,3 @@
+TEST_F(FormatTest, KernighanRitchieBraceBreaking) {
+  FormatStyle BreakBeforeBrace = getLLVMStyle();
+  BreakBeforeBrace.BreakBeforeBraces = FormatStyle::BS_KernighanRitchie;
----------------
Call this KRStyle?

http://reviews.llvm.org/D4837



_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to