An addendum to D59087: [clang-format] [PR25010] AllowShortIfStatementsOnASingleLine not working if an "else" statement is present following discussions with submitter of https://bugs.llvm.org/show_bug.cgi?id=25010
it didn't make sense that, we could only do short if and not short else if and short else if they didn't have compound statments
if (true) return 0; if (true) return 0; else return 1; if (true) return 0; else if (false) return 1; if (true) return 0; else if (false) return 1; else return 2; if (true) return 0; else if (false) return 1; else { return 2; }
The following revision extends the capability form D59087: [clang-format] [PR25010] AllowShortIfStatementsOnASingleLine not working if an "else" statement is present to allow that if the correct setting is provided
existing true/false still honor the original meaning of AllowShortIfStatementsOnASingleLine
but the additional options now allow more fine grained control over how else/if and else should/could be handled.
I'd try to make this either unconditionally what we do, or decide against doing it.