| Issue |
53110
|
| Summary |
clang-format does not regonice attributes within switch/case statements
|
| Labels |
new issue
|
| Assignees |
|
| Reporter |
degasus
|
Raw input
```C++
void a();
void b();
void f(int i, bool en_b) {
switch (i) {
case 0:
a();
break;
[[likely]] case 1:
if (en_b) {
b();
}
break;
}
}
```
clang-format-13 output:
```C++
void a();
void b();
void f(int i, bool en_b) {
switch (i) {
case 0:
a();
break;
[[likely]] case 1 : if (en_b) { b(); }
break;
}
}
```
It seems like the `case` statement is not regoniced with an attribute.
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs