summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CodeGenFunction.cpp
diff options
context:
space:
mode:
authorKrasimir Georgiev <krasimir@google.com>2017-03-08 12:54:50 +0000
committerKrasimir Georgiev <krasimir@google.com>2017-03-08 12:54:50 +0000
commitbc05ebaa5a906b8f6b0d79a5335c35cba27abee5 (patch)
treed6925da47ceed187111c106fa640307eb60ba97b /clang/lib/CodeGen/CodeGenFunction.cpp
parentf82d68ff533e50e27129d6a8905fb716f9f79937 (diff)
downloadbcm5719-llvm-bc05ebaa5a906b8f6b0d79a5335c35cba27abee5.tar.gz
bcm5719-llvm-bc05ebaa5a906b8f6b0d79a5335c35cba27abee5.zip
[clang-format] Look at NoLineBreak and NoLineBreakInOperand before breakProtrudingToken
Summary: This patch makes ContinuationIndenter call breakProtrudingToken only if NoLineBreak and NoLineBreakInOperand is false. Previously, clang-format required two runs to converge on the following example with 24 columns: Note that the second operand shouldn't be splitted according to NoLineBreakInOperand, but the token breaker doesn't take that into account: ``` func(a, "long long long long", c); ``` After first run: ``` func(a, "long long " "long long", c); ``` After second run, where NoLineBreakInOperand is taken into account: ``` func(a, "long long " "long long", c); ``` With the patch, clang-format now obtains in one run: ``` func(a, "long long long" "long", c); ``` which is a better token split overall. Reviewers: djasper Reviewed By: djasper Subscribers: cfe-commits, klimek Differential Revision: https://reviews.llvm.org/D30575 llvm-svn: 297274
Diffstat (limited to 'clang/lib/CodeGen/CodeGenFunction.cpp')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud