Before:
#define A \
if (a) \
label: \
f()
After:
#define A \
if (a) \
label: \
f()
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@265557
91177308-0d34-0410-b5e6-
96231b3b80d8
addUnwrappedLine();
}
Line->Level = OldLineLevel;
- if (FormatTok->isNot(tok::l_brace))
+ if (FormatTok->isNot(tok::l_brace)) {
parseStructuralElement();
+ addUnwrappedLine();
+ }
}
void UnwrappedLineParser::parseCaseLabel() {
verifyFormat("if (a)\n if (b) {\n f();\n }\ng();");
FormatStyle AllowsMergedIf = getLLVMStyle();
+ AllowsMergedIf.AlignEscapedNewlinesLeft = true;
AllowsMergedIf.AllowShortIfStatementsOnASingleLine = true;
verifyFormat("if (a)\n"
" // comment\n"
" f();\n"
"}",
AllowsMergedIf);
+ verifyFormat("#define A \\\n"
+ " if (a) \\\n"
+ " label: \\\n"
+ " f()",
+ AllowsMergedIf);
verifyFormat("if (a)\n"
" ;",
AllowsMergedIf);