diff options
Diffstat (limited to 'lib/Format')
-rw-r--r-- | lib/Format/Format.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/Format/Format.cpp b/lib/Format/Format.cpp index 53dc97abec..1854d70d90 100644 --- a/lib/Format/Format.cpp +++ b/lib/Format/Format.cpp @@ -333,7 +333,9 @@ private: if (!DryRun) replaceWhitespace(Current, 0, Spaces); - if (RootToken.isNot(tok::kw_for) && + // FIXME: Do we need to do this for assignments nested in other + // expressions? + if (RootToken.isNot(tok::kw_for) && ParenLevel == 0 && (getPrecedence(Previous) == prec::Assignment || Previous.is(tok::kw_return))) State.Indent[ParenLevel] = State.Column + Spaces; |