[PATCH] D33447: clang-format: add option to merge empty function body

Daniel Jasper via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri May 26 08:42:41 PDT 2017

djasper added inline comments.

Comment at: include/clang/Format/Format.h:644
+    /// This option is used only if the opening brace of the function has
+    /// already
+    /// been wrapped, i.e. the `AfterFunction` brace wrapping mode is set, and
Reflow the comment.

Comment at: include/clang/Format/Format.h:654
+    ///
+    bool AllowEmptyFunctionBody;
     /// \brief Wrap before ``catch``.
I think the name probably isn't very intuitive. Maybe invert it and call it "SplitEmptyFunctionBody"?

Comment at: unittests/Format/FormatTest.cpp:6092
+  verifyFormat("int f()\n"
+			   "{\n"
+               "  return 42;\n"
indent. Here and elsewhere.


More information about the cfe-commits mailing list