Add option to customize the penalty for breaking assignment
This allows increasing the priority of the assignment, to prefer spliting
an operation instead of splitting the assignment, e.g. :
int a = bbbbbbbbbbbbbbbb + cccccccccccccccc;
Paths
| Differential D32477
clang-format: Allow customizing the penalty for breaking assignment ClosedPublic Authored by Typz on Apr 25 2017, 1:14 AM.
Details Summary Add option to customize the penalty for breaking assignment This allows increasing the priority of the assignment, to prefer spliting int a = bbbbbbbbbbbbbbbb + cccccccccccccccc;
Diff Detail
Event TimelineTypz added a parent revision: D32081: Add support for editor placeholders to Clang's lexer.Apr 25 2017, 1:15 AM Typz retitled this revision from Allow customizing the penalty for breaking assignment to [clang-format] Allow customizing the penalty for breaking assignment.Apr 25 2017, 1:39 AM Comment Actions Basically looks good, but please add a test case where the penalty is high show that it changes behavior. Typz retitled this revision from [clang-format] Allow customizing the penalty for breaking assignment to clang-format: Allow customizing the penalty for breaking assignment.May 18 2017, 4:55 AM This revision is now accepted and ready to land.May 18 2017, 11:59 PM Closed by commit rL303534: clang-format: Allow customizing the penalty for breaking assignment (authored by Typz). · Explain WhyMay 22 2017, 1:28 AM This revision was automatically updated to reflect the committed changes.
Revision Contents
Diff 99720 cfe/trunk/include/clang/Format/Format.h
cfe/trunk/lib/Format/Format.cpp
cfe/trunk/lib/Format/TokenAnnotator.cpp
cfe/trunk/unittests/Format/FormatTest.cpp
|