https://bugs.llvm.org/show_bug.cgi?id=48305
Bug ID: 48305
Summary: clang-format mismatches braces with nested unnamed
scopes
Product: clang
Version: 11.0
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: Formatter
Assignee: unassignedclangb...@nondot.org
Reporter: mateuszalewi...@gmail.com
CC: djas...@google.com, kli...@google.com,
llvm-bugs@lists.llvm.org
Hello.
With clang-format -10 and -11 installed from repo on ubuntu 20.11 following c++
code is obviously formatted wrong:
```
clang-format-11 -style=llvm test.cpp
void foo() {
{// asdf
{int a;
}
}
{
{ int b; }
}
}
```
Removing `{// asdf` is sufficient to format it ok.
I expect it to be formatted like this (possibly with comment in new line, but
this may be llvm style):
```
void foo() {
{// asdf
{ int a; }
}
{
{ int b; }
}
}
```
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs