Skip to content

Wrong indentation of 'break' #663

@Yraine

Description

@Yraine

Empty config.

Simple case, before formatting:

void test1( int n )
{
    switch ( n )
    {
    case 1:
    {
        std::cout << "1" << std::endl;
    }
    break;
    }
}

void test2( int n )
{
    switch ( n )
    {
    case 1:
    { std::cout << "1" << std::endl; }
    break;
    }
}

After formatting:

void test1( int n )
{
    switch ( n )
    {
    case 1:
    {
        std::cout << "1" << std::endl;
    }
    break;
    }
}

void test2( int n )
{
    switch ( n )
    {
    case 1:
    { std::cout << "1" << std::endl; }
                                 break;
    }
}

'break' in test1 is ok.
'break' in test2 has a wrong indentation.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions