summaryrefslogtreecommitdiffstats
path: root/lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp
diff options
context:
space:
mode:
authorKrasimir Georgiev <krasimir@google.com>2018-10-31 17:56:57 +0000
committerKrasimir Georgiev <krasimir@google.com>2018-10-31 17:56:57 +0000
commit5528cace0402a57564a4b541dcce755a27737d51 (patch)
tree3e5472a6b20644de54e6c543bf5a02a0abbeca8e /lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp
parent5bcec66c554c1d9a5255bc6763c216ff44dae4c4 (diff)
downloadbcm5719-llvm-5528cace0402a57564a4b541dcce755a27737d51.tar.gz
bcm5719-llvm-5528cace0402a57564a4b541dcce755a27737d51.zip
[clang-format] tweaked another case of lambda formatting
Summary: This is done in order to improve cases where the lambda's body is moved too far to the right. Consider the following snippet with column limit set to 79: ``` void f() { leader::MakeThisCallHere(&leader_service_, cq_.get(), [this, liveness](const leader::ReadRecordReq& req, std::function<void()> done) { logger_->HandleReadRecord( req, resp, std::move(done)); }); leader::MakeAnother(&leader_service_, cq_.get(), [this, liveness](const leader::ReadRecordReq& req, std::function<void()> done) { logger_->HandleReadRecord( req, resp, std::move(done), a); }); } ``` The tool favors extra indentation for the lambda body and so the code incurs extra wrapping and adjacent calls are indented to a different level. I find this behavior annoying and I'd like the tool to favor new lines and, thus, use the extra width. The fix, reduced, brings the following formatting. Before: function(1, [] { DoStuff(); // }, 1); After: function( 1, [] { DoStuff(); // }, 1); Refer to the new tests in FormatTest.cpp Contributed by oleg.smolsky! Reviewers: djasper, klimek, krasimir Subscribers: cfe-commits, owenpan Tags: #clang Differential Revision: https://reviews.llvm.org/D52676 llvm-svn: 345753
Diffstat (limited to 'lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud