Open
Description
Tested with: clang-format version 20.1.3 (https://github.com/llvm/llvm-project 923a5c4)
Using BraceWrapping.AfterControlStatement: MultiLine
leads to inconsistent formatting between single-line and multi-line if
statements, which creates a visual inconsistency in codebases that use the compact if (cond) {} style.
BraceWrapping:
AfterControlStatement: MultiLine
if (!flag1) {
return;
}
if (flag2)
{
return;
}
If a codebase uses AfterControlStatement: Never
and all if statements were consistent, it may still be desirable to apply AfterControlStatement: MultiLine
for multi-line if conditions only, while keeping AfterControlStatement: Never
for all other cases.