From e7bcad327814a78ecb8d5f5545d2e3df84c67a5c Mon Sep 17 00:00:00 2001 From: dim Date: Sun, 5 Jul 2015 14:23:59 +0000 Subject: Vendor import of clang trunk r241361: https://llvm.org/svn/llvm-project/cfe/trunk@241361 --- lib/Format/ContinuationIndenter.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'lib/Format/ContinuationIndenter.cpp') diff --git a/lib/Format/ContinuationIndenter.cpp b/lib/Format/ContinuationIndenter.cpp index 2357abd..ed01d68 100644 --- a/lib/Format/ContinuationIndenter.cpp +++ b/lib/Format/ContinuationIndenter.cpp @@ -126,7 +126,8 @@ bool ContinuationIndenter::canBreak(const LineState &State) { // Don't break after very short return types (e.g. "void") as that is often // unexpected. if (Current.is(TT_FunctionDeclarationName) && - !Style.AlwaysBreakAfterDefinitionReturnType && State.Column < 6) + Style.AlwaysBreakAfterDefinitionReturnType == FormatStyle::DRTBS_None && + State.Column < 6) return false; return !State.Stack.back().NoLineBreak; @@ -815,7 +816,7 @@ void ContinuationIndenter::moveStatePastFakeLParens(LineState &State, // ParameterToInnerFunction)); if (*I > prec::Unknown) NewParenState.LastSpace = std::max(NewParenState.LastSpace, State.Column); - if (*I != prec::Conditional) + if (*I != prec::Conditional && !Current.is(TT_UnaryOperator)) NewParenState.StartOfFunctionCall = State.Column; // Always indent conditional expressions. Never indent expression where -- cgit v1.1