[PATCH] D115879: [clang-format] extern with new line brace without indentation

Marek Kurdej via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Dec 16 13:31:10 PST 2021


curdeius requested changes to this revision.
curdeius added inline comments.
This revision now requires changes to proceed.


================
Comment at: clang/unittests/Format/FormatTest.cpp:3815
+
+  Style.IndentExternBlock = FormatStyle::IEBS_AfterExternBlock;
+  Style.BreakBeforeBraces = FormatStyle::BS_Custom;
----------------
This line is unnecessary and misleading (copied from above?), as `IndentExternBlock` is overridden at line 3818. Please delete.


================
Comment at: clang/unittests/Format/FormatTest.cpp:3819
+  Style.IndentExternBlock = FormatStyle::IEBS_NoIndent;
+  verifyFormat("extern \"C\"\n{ /*13*/\n}", Style);
+  verifyFormat("extern \"C\"\n{\n"
----------------
I'd prefer that you split strings after `\n`. I find it easier to read that way.
The same below.


================
Comment at: clang/unittests/Format/FormatTest.cpp:3825
+
+  Style.IndentExternBlock = FormatStyle::IEBS_AfterExternBlock;
+  Style.BreakBeforeBraces = FormatStyle::BS_Custom;
----------------
Ditto. Remove.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D115879



More information about the cfe-commits mailing list