diff options
author | Marek Kurdej <marek.kurdej+llvm.org@gmail.com> | 2022-01-03 17:32:20 +0100 |
---|---|---|
committer | Marek Kurdej <marek.kurdej+llvm.org@gmail.com> | 2022-01-04 08:28:12 +0100 |
commit | e2b6e21f19da6fe0da9349264e43286f0441b4ca (patch) | |
tree | 3fb8fba169d02bb5c0311df173e42b4093258abf /llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp | |
parent | 2a0e05100c26473b3ce94507200b55f71a9c9482 (diff) | |
download | llvm-e2b6e21f19da6fe0da9349264e43286f0441b4ca.zip llvm-e2b6e21f19da6fe0da9349264e43286f0441b4ca.tar.gz llvm-e2b6e21f19da6fe0da9349264e43286f0441b4ca.tar.bz2 |
[clang-format] Fix incorrect formatting of lambdas inside brace initialisation
Fixes https://github.com/llvm/llvm-project/issues/27146.
Fixes https://github.com/llvm/llvm-project/issues/52943.
Before:
```
namespace ns {
void foo() {
std::variant<int, double> v;
std::visit(overloaded{[](auto &&) -> int (*)[] { return nullptr; }}, v);
}
} // namespace ns
int break_me() {
int x = 42;
return int{[x = x]() {
return x;
}()};
}
```
got formatted as:
```
namespace ns {
void foo() {
std::variant<int, double> v;
std::visit(overloaded{[](auto &&) -> int (*)[] { return nullptr;
}
} // namespace ns
, v);
}
} // namespace ns
int break_me() {
int x = 42;
return int{[x = x](){return x;
}
()
}
;
}
```
Reviewed By: HazardyKnusperkeks, owenpan
Differential Revision: https://reviews.llvm.org/D116553
Diffstat (limited to 'llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp')
0 files changed, 0 insertions, 0 deletions