llvm-project
llvm-project copied to clipboard
Clangd format bug
OS: macOS Sonoma Version 14.5, M1 Buggy Clangd: Apple clangd version 15.0.0 (clang-1500.3.9.4)
With this .clang-format
---
BasedOnStyle: LLVM
---
I have this MRE code snippet:
auto func() {
{
{
auto k = [] { return 1; }();
}
{ auto x = 1; }
}
{}
}
Apple clang formats it to
auto func() {
{{auto k = [] { return 1; }();
}
{ auto x = 1; }
}
{}
}
Homebrew clang-format (Homebrew clang-format version 18.1.7) formats it to this, which seems correct.
auto func() {
{
{
auto k = [] { return 1; }();
}
{ auto x = 1; }
}
{}
}