[PATCH] D146042: [clang-format] Fix numerous issues with "LambdaBodyIndentation: OuterScope" option
Jon Phillips via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Mar 14 06:37:54 PDT 2023
jp4a50 added inline comments.
================
Comment at: clang/lib/Format/ContinuationIndenter.cpp:1132
+ State.NextToken->is(TT_LambdaLBrace) && State.Line &&
+ State.Line->Level != 0)) {
+ return State.FirstIndent;
----------------
Note that we do not apply "OuterScope" behaviour when the line's indentation level is 0 to avoid placing a lambda's closing brace at 0 indentation like this:
```
class Foo :
callback{[] {
},
bar,
baz} {}
```
In other words, we generally try to apply this rule at function/block scope but not otherwise.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D146042/new/
https://reviews.llvm.org/D146042
More information about the cfe-commits
mailing list