[PATCH] D32478: [clang-format] Fix AlignOperands when BreakBeforeBinaryOperators is set

Francois Ferrand via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri May 26 02:00:45 PDT 2017

Typz added inline comments.

Comment at: lib/Format/ContinuationIndenter.cpp:949
+         Previous->is(tok::kw_return)))
+      NewParenState.UnindentOperator = true;
djasper wrote:
> I am not yet convinced you need a new flag in ParenState here. I guess you need it because the operators can have varying length and so you cannot just change LastSpace here?
exactly. This is set when passing through the equal/return sign, but indent must be adjusted for each line individually based on the actual size of that line's leading operator.


More information about the cfe-commits mailing list