[PATCH] D40988: Clang-format: add finer-grained options for putting all arguments on one line
Russell McClellan via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Apr 26 20:47:02 PDT 2018
russellmcc updated this revision to Diff 144269.
russellmcc added a comment.
Responded to review feedback.
Improved documentation comments for new options.
While adding tests for the other constructor line break styles, I noticed an inconsistency with the way "after colon" behaved with `ConstructorInitializerAllOnOneLineOrOnePerLine`. Unlike the other two modes, "after colon" breaking would never allow all initializers on a single line. I've changed the behavior so the new `AllowAllConstructorInitializersOnNextLine` is honored even in break after colon mode. This does cause a slight change in behavior for default settings, as now in after colon mode it will be allowed to put all the initializers in one line with default settings. I've updated the unit tests for break after colon mode to address this.
https://reviews.llvm.org/D40988
Files:
include/clang/Format/Format.h
lib/Format/ContinuationIndenter.cpp
lib/Format/Format.cpp
unittests/Format/FormatTest.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D40988.144269.patch
Type: text/x-patch
Size: 15093 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20180427/666f07a6/attachment-0001.bin>
More information about the cfe-commits
mailing list