llvm2c icon indicating copy to clipboard operation
llvm2c copied to clipboard

Flatten the structure of outputted program

Open tomsik68 opened this issue 6 years ago • 0 comments

For example, in this snippet:

if (condition) {
    return;
} else {
    /*
    some
    long
    computation
    */
}

The "positive" branch of if statement always returns, so there is no point in having else there. The program would be a lot more readable if the else wasn't there and the block inside else continued with the same indent level as the if statement.

tomsik68 avatar Oct 04 '19 12:10 tomsik68