[PATCH] D32525: [clang-format] Add SpaceBeforeColon option
Daniel Jasper via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Feb 28 07:20:39 PST 2018
djasper added a comment.
I think this generally looks good, but needs a few more tests.
================
Comment at: include/clang/Format/Format.h:1204
+ /// \brief If ``false``, spaces will be removed before constructor initializer
+ /// colon.
----------------
When this file is changed, can you also run docs/tools/dump_format_style.py to update the docs?
================
Comment at: unittests/Format/FormatTest.cpp:7539
+ verifyFormat("class Foo : public Bar {};", CtorInitializerStyle);
+ verifyFormat("Foo::Foo(): foo(1) {}", CtorInitializerStyle);
+ verifyFormat("for (auto a : b) {\n}", CtorInitializerStyle);
----------------
Can you add tests for the other values of BreakConstructorInitializers (BCIS_BeforeColon, BCIS_BeforeComma)?
https://reviews.llvm.org/D32525
More information about the cfe-commits
mailing list