Issue 71340
Summary clang-format should apply `OuterScope` only if one function argument is a lambda
Labels
Assignees
Reporter owenca
    ```
$ cat test.cpp
dyn_switch(V->stripPointerCasts(),
           [] (PHINode *PN) {
             // process phis...
           },
           [] (AllocaInst *AI) {
             // process allocas...
 });
$ clang-format -version
clang-format version 17.0.4
$ clang-format -style='{LambdaBodyIndentation: OuterScope}' test.cpp
dyn_switch(
    V->stripPointerCasts(),
    [](PHINode *PN) {
  // process phis...
},
    [](AllocaInst *AI) {
  // process allocas...
});
```
Expected output: same as input

In other words, `OuterScope` shouldn't apply if multiple arguments in a function call are lambdas. @jp4a50
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to