[PATCH] D90533: [clang-format] Always consider option PenaltyBreakBeforeFirstCallParameter
Mark Nauwelaerts via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Sat Oct 31 08:02:41 PDT 2020
mnauw created this revision.
mnauw added a reviewer: sammccall.
mnauw added a project: clang-format.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.
mnauw requested review of this revision.
If AlignAfterOpenBracket is set to BAS_DontAlign, then it turns out that PenaltyBreakBeforeFirstCallParameter is not considered (due to hard-coded shortcut, so to speak).
This patch attempts to preserve the current (specially crafted) behavior, while considering PenaltyBreakBeforeFirstCallParameter when really specified. There may also be other ways to go about this to allow the user to actually set and use PenaltyBreakBeforeFirstCallParameter. Failing all such options, it might otherwise be documented that PenaltyBreakBeforeFirstCallParameter has no effect in BAS_DontAlign.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D90533
Files:
clang/lib/Format/Format.cpp
clang/lib/Format/TokenAnnotator.cpp
clang/unittests/Format/FormatTest.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D90533.302092.patch
Type: text/x-patch
Size: 4780 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20201031/87d46969/attachment.bin>
More information about the cfe-commits
mailing list