Open
Description
Labels are virtually unused, but they still need to be formatted correctly. If you format:
main() {
if (c) L: {s;}
}
The formatter produces:
main() {
if (c) L:
{
s;
}
}
The more indentation, the more spaces before the label, even though it doesn't put a newline there. So if you format:
main() {
{
{
{
if (c) L: {s;}
}
}
}
}
You get:
main() {
{
{
{
if (c) L:
{
s;
}
}
}
}
}
Similar behavior happens with loops:
main() {
{
{
{
for (;;) L: {s;}
while (c) L: {s;}
}
}
}
}
Produces:
main() {
{
{
{
for (;;) L:
{
s;
}
while (c) L:
{
s;
}
}
}
}
}