[PATCH] D93846: [clang-format] PR16518 Add flag to suppress empty line insertion before access modifier

Björn Schäpers via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Dec 28 07:12:53 PST 2020


HazardyKnusperkeks added inline comments.


================
Comment at: clang/include/clang/Format/Format.h:68
+  /// \endcode
+  bool InsertEmptyLineBeforeAccessModifier;
+
----------------
MyDeveloperDay wrote:
> quite a mouthful... maybe just `NewLineBeforeAccessModifier` ?
A new line is always there, how about `EmptyLineBeforeAccessModifier`?

Apart from that, I would prefer an alphabetical sorting of the member, most of them are (not all I know...).


================
Comment at: clang/include/clang/Format/Format.h:2370
            IndentWrappedFunctionNames == R.IndentWrappedFunctionNames &&
+           InsertEmptyLineBeforeAccessModifier ==
+               R.InsertEmptyLineBeforeAccessModifier &&
----------------
Here it is sorted.


================
Comment at: clang/lib/Format/Format.cpp:414
     IO.mapOptional("AccessModifierOffset", Style.AccessModifierOffset);
+    IO.mapOptional("InsertEmptyLineBeforeAccessModifier",
+                   Style.InsertEmptyLineBeforeAccessModifier);
----------------
Here again not.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D93846/new/

https://reviews.llvm.org/D93846



More information about the cfe-commits mailing list