[PATCH] D32525: [clang-format] Add SpaceBeforeColon option

Daniel Jasper via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Feb 28 08:36:40 PST 2018


djasper added inline comments.


================
Comment at: unittests/Format/FormatTest.cpp:8969
+               "    barrrrrrrrrrrrrr(1) {}", CtorInitializerStyle);
+  CtorInitializerStyle.BreakConstructorInitializers = FormatStyle::BCIS_BeforeComma;
+  verifyFormat("Fooooooooooo::Fooooooooooo()\n"
----------------
This is a useless test if it doesn't actually have multiple initializers separated by a comma.


================
Comment at: unittests/Format/FormatTest.cpp:8971
+  verifyFormat("Fooooooooooo::Fooooooooooo()\n"
+               "    : barrrrrrrrrrrrrr(1) {}", CtorInitializerStyle);
+  CtorInitializerStyle.BreakConstructorInitializers = FormatStyle::BCIS_BeforeColon;
----------------
Has this been formatted by clang-format? I think it'd break after the comma.


Repository:
  rC Clang

https://reviews.llvm.org/D32525





More information about the cfe-commits mailing list