Before:
b = a &&
// Comment
b.c &&
d;
After:
b = a &&
// Comment
b.c && d;
This fixes llvm.org/PR21535.
llvm-svn: 221727
Current->OperatorIndex = OperatorIndex;
++OperatorIndex;
}
-
- next(/*SkipPastLeadingComments=*/false);
+ next(/*SkipPastLeadingComments=*/Precedence > 0);
}
}
}
verifyFormat("if ((aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa ||\n"
" bbbbbbbbbbbbbbbbbb) && // aaaaaaaaaaaaaaaa\n"
" cccccc) {\n}");
+ verifyFormat("b = a &&\n"
+ " // Comment\n"
+ " b.c && d;");
// If the LHS of a comparison is not a binary expression itself, the
// additional linebreak confuses many people.