Before:
for (int*p, *q; p != q; p = p->next) {
After:
for (int *p, *q; p != q; p = p->next) {
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@283246
91177308-0d34-0410-b5e6-
96231b3b80d8
Left.Previous->is(tok::r_paren)) ||
(!Left.isOneOf(TT_PointerOrReference, tok::l_paren) &&
(Style.PointerAlignment != FormatStyle::PAS_Left ||
- (Line.IsMultiVariableDeclStmt && Left.NestingLevel == 0))));
+ (Line.IsMultiVariableDeclStmt &&
+ (Left.NestingLevel == 0 ||
+ (Left.NestingLevel == 1 && Line.First->is(tok::kw_for)))))));
if (Right.is(TT_FunctionTypeLParen) && Left.isNot(tok::l_paren) &&
(!Left.is(TT_PointerOrReference) ||
(Style.PointerAlignment != FormatStyle::PAS_Right &&
" *b = bbbbbbbbbbbbbbbbbbb, *d = ddddddddddddddddddd;",
Style);
verifyFormat("vector<int*> a, b;", Style);
+ verifyFormat("for (int *p, *q; p != q; p = p->next) {\n}", Style);
}
TEST_F(FormatTest, ConditionalExpressionsInBrackets) {