[PATCH] D156259: Fix a bug that erroneously placed function arguments on a new line despite all arguments being able to fit on the same line.
Björn Schäpers via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Jul 31 12:55:49 PDT 2023
HazardyKnusperkeks added inline comments.
================
Comment at: clang/lib/Format/ContinuationIndenter.cpp:657-666
+ bool DisallowLineBreaksOnThisLine = [&Style = this->Style, &Current] {
+ // Deal with lambda arguments in C++. The aim here is to ensure that we
+ // don't over-indent lambda function bodies when lamdbas are passed as
+ // arguments to function calls. We do this by ensuring that either all
+ // arguments (including any lambdas) go on the same line as the function
+ // call, or we break before the first argument.
+ if (Style.Language != FormatStyle::LK_Cpp &&
----------------
I'd go for this.
But that's not necessary.
================
Comment at: clang/lib/Format/ContinuationIndenter.cpp:659
+ // Deal with lambda arguments in C++. The aim here is to ensure that we
+ // don't over-indent lambda function bodies when lamdbas are passed as
+ // arguments to function calls. We do this by ensuring that either all
----------------
lambdas
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D156259/new/
https://reviews.llvm.org/D156259
More information about the cfe-commits
mailing list