Is it worth (perhaps you're planning to later) including a test case of
where this produced a clearly bad outcome, to avoid the regression in the
future?
On Sep 19, 2014 1:13 AM, "Daniel Jasper" <[email protected]> wrote:

> Author: djasper
> Date: Fri Sep 19 03:01:25 2014
> New Revision: 218107
>
> URL: http://llvm.org/viewvc/llvm-project?rev=218107&view=rev
> Log:
> clang-format: Undo r216377.
>
> It has proven to not be a food idea in many case.
>
> Modified:
>     cfe/trunk/lib/Format/ContinuationIndenter.cpp
>     cfe/trunk/unittests/Format/FormatTest.cpp
>
> Modified: cfe/trunk/lib/Format/ContinuationIndenter.cpp
> URL:
> http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Format/ContinuationIndenter.cpp?rev=218107&r1=218106&r2=218107&view=diff
>
> ==============================================================================
> --- cfe/trunk/lib/Format/ContinuationIndenter.cpp (original)
> +++ cfe/trunk/lib/Format/ContinuationIndenter.cpp Fri Sep 19 03:01:25 2014
> @@ -867,10 +867,9 @@ void ContinuationIndenter::moveStatePast
>              getColumnLimit(State))
>        BreakBeforeParameter = true;
>    }
> -  bool NoLineBreak =
> -      State.Stack.back().NoLineBreak ||
> -      ((Current.NestingLevel != 0 || Current.Type == TT_TemplateOpener) &&
> -       State.Stack.back().ContainsUnwrappedBuilder);
> +  bool NoLineBreak = State.Stack.back().NoLineBreak ||
> +                     (Current.Type == TT_TemplateOpener &&
> +                      State.Stack.back().ContainsUnwrappedBuilder);
>    State.Stack.push_back(ParenState(NewIndent, NewIndentLevel,
>                                     State.Stack.back().LastSpace,
>                                     AvoidBinPacking, NoLineBreak));
>
> Modified: cfe/trunk/unittests/Format/FormatTest.cpp
> URL:
> http://llvm.org/viewvc/llvm-project/cfe/trunk/unittests/Format/FormatTest.cpp?rev=218107&r1=218106&r2=218107&view=diff
>
> ==============================================================================
> --- cfe/trunk/unittests/Format/FormatTest.cpp (original)
> +++ cfe/trunk/unittests/Format/FormatTest.cpp Fri Sep 19 03:01:25 2014
> @@ -3831,12 +3831,9 @@ TEST_F(FormatTest, FormatsBuilderPattern
>                 "    .aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa<\n"
>                 "        aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa>();");
>
> -  // Prefer not to break after empty parentheses ...
> +  // Prefer not to break after empty parentheses.
>
>  verifyFormat("FirstToken->WhitespaceRange.getBegin().getLocWithOffset(\n"
>                 "    First->LastNewlineOffset);");
> -  // ... unless nested.
> -  verifyFormat("f(FirstToken->WhitespaceRange.getBegin()\n"
> -               "      .getLocWithOffset(First->LastNewlineOffset));");
>  }
>
>  TEST_F(FormatTest, BreaksAccordingToOperatorPrecedence) {
>
>
> _______________________________________________
> cfe-commits mailing list
> [email protected]
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
>
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to