Issue 128016
Summary clang-format LambdaBodyIndentation incorrectly work with custom IndentWidth
Labels
Assignees
Reporter Childcity
    - clang-format: 13.0 _or higher_.
- reproduced on 19.1.7 / 21.0.0

`LambdaBodyIndentation` doesn't work correctly with the following config:
```
LambdaBodyIndentation: Signature
ColumnLimit: 100
IndentWidth: 4
TabWidth: 4
UseTab: ForIndentation
```

## Steps To Reproduce:

- Save test.cpp
  ```cpp
  void foo() {
  	auto it =
  	 std::find_if(list.cbegin(), list.cend(), [config](const FooBazzBarrAaaaFooBazzBar &other) {
  		    return other->isEqual(config);
  	    });
  }
  ```
- Run  `clang-format.exe -i -style='{LambdaBodyIndentation: Signature, ColumnLimit: 100, IndentWidth: 4, TabWidth: 4, UseTab: ForIndentation}' "D:\test.cpp"`
  
## Expected Result
<img src="" width="700">
  
## Actual Result

<img src="" width="700">

_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to