Issue |
135959
|
Summary |
[clang-format] Incorrect formatting when applying C-style cast to lambda _expression_
|
Labels |
clang-format
|
Assignees |
|
Reporter |
alumkal
|
OS: Windows 11
Version: `clang-format version 20.1.2`
Example code:
```cpp
int main() {
auto foo { (std::function<int()>)[] { return 0; }};
return 0;
}
```
After formatting:
```cpp
int main() { auto foo{(std::function<int()>)[]{return 0; }
}
;
return 0;
}
```
`auto foo = (std::function<int()>)[] { return 0; };` and `auto foo { std::function<int()>([] { return 0; }) };` works as expected.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs