Index: lib/Format/ContinuationIndenter.cpp =================================================================== --- lib/Format/ContinuationIndenter.cpp +++ lib/Format/ContinuationIndenter.cpp @@ -597,7 +597,9 @@ TT_AttributeParen, TT_FunctionAnnotationRParen, TT_JavaAnnotation, TT_LeadingJavaAnnotation))) || (!Style.IndentWrappedFunctionNames && - NextNonComment->isOneOf(tok::kw_operator, TT_FunctionDeclarationName))) + (NextNonComment->is(TT_FunctionDeclarationName) || + (NextNonComment->is(tok::kw_operator) && + !NextNonComment->Previous->is(tok::coloncolon))))) return std::max(State.Stack.back().LastSpace, State.Stack.back().Indent); if (NextNonComment->is(TT_SelectorName)) { if (!State.Stack.back().ObjCSelectorNameFound) { Index: unittests/Format/FormatTest.cpp =================================================================== --- unittests/Format/FormatTest.cpp +++ unittests/Format/FormatTest.cpp @@ -3707,6 +3707,11 @@ "SomeClasssssssssssssssssssssssssssssssssssssss::\n" " bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb(Cccccccccccccc cccccccccc);", getGoogleStyle()); + verifyFormat( + "Aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\n" + "SomeClasssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss::\n" + " operator+=(Cccccccccccccc cccccccccc);", + getGoogleStyle()); // However, there are exceptions, if a sufficient amount of lines can be // saved.