Index: lib/Format/ContinuationIndenter.cpp =================================================================== --- lib/Format/ContinuationIndenter.cpp +++ lib/Format/ContinuationIndenter.cpp @@ -237,11 +237,8 @@ Previous.is(tok::l_brace) && !Current.isOneOf(tok::r_brace, tok::comment)) return true; - if (Current.is(tok::lessless) && Previous.is(tok::identifier) && - Previous.TokenText == "endl") - return true; - - return false; + return Current.is(tok::lessless) && Previous.is(tok::identifier) && + Previous.TokenText == "endl"; } unsigned ContinuationIndenter::addTokenToState(LineState &State, bool Newline, Index: lib/Format/TokenAnnotator.cpp =================================================================== --- lib/Format/TokenAnnotator.cpp +++ lib/Format/TokenAnnotator.cpp @@ -1850,9 +1850,7 @@ Left.MatchingParen->Previous->is(tok::period)) // A.DoSomething(); return false; - if (Left.is(TT_TemplateCloser) && Right.is(tok::l_square)) - return false; - return true; + return !Left.is(TT_TemplateCloser) || !Right.is(tok::l_square); } bool TokenAnnotator::spaceRequiredBefore(const AnnotatedLine &Line,