<p dir="ltr">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?</p>
<div class="gmail_quote">On Sep 19, 2014 1:13 AM, "Daniel Jasper" <<a href="mailto:djasper@google.com">djasper@google.com</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Author: djasper<br>
Date: Fri Sep 19 03:01:25 2014<br>
New Revision: 218107<br>
<br>
URL: <a href="http://llvm.org/viewvc/llvm-project?rev=218107&view=rev" target="_blank">http://llvm.org/viewvc/llvm-project?rev=218107&view=rev</a><br>
Log:<br>
clang-format: Undo r216377.<br>
<br>
It has proven to not be a food idea in many case.<br>
<br>
Modified:<br>
cfe/trunk/lib/Format/ContinuationIndenter.cpp<br>
cfe/trunk/unittests/Format/FormatTest.cpp<br>
<br>
Modified: cfe/trunk/lib/Format/ContinuationIndenter.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Format/ContinuationIndenter.cpp?rev=218107&r1=218106&r2=218107&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Format/ContinuationIndenter.cpp?rev=218107&r1=218106&r2=218107&view=diff</a><br>
==============================================================================<br>
--- cfe/trunk/lib/Format/ContinuationIndenter.cpp (original)<br>
+++ cfe/trunk/lib/Format/ContinuationIndenter.cpp Fri Sep 19 03:01:25 2014<br>
@@ -867,10 +867,9 @@ void ContinuationIndenter::moveStatePast<br>
getColumnLimit(State))<br>
BreakBeforeParameter = true;<br>
}<br>
- bool NoLineBreak =<br>
- State.Stack.back().NoLineBreak ||<br>
- ((Current.NestingLevel != 0 || Current.Type == TT_TemplateOpener) &&<br>
- State.Stack.back().ContainsUnwrappedBuilder);<br>
+ bool NoLineBreak = State.Stack.back().NoLineBreak ||<br>
+ (Current.Type == TT_TemplateOpener &&<br>
+ State.Stack.back().ContainsUnwrappedBuilder);<br>
State.Stack.push_back(ParenState(NewIndent, NewIndentLevel,<br>
State.Stack.back().LastSpace,<br>
AvoidBinPacking, NoLineBreak));<br>
<br>
Modified: cfe/trunk/unittests/Format/FormatTest.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/unittests/Format/FormatTest.cpp?rev=218107&r1=218106&r2=218107&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/cfe/trunk/unittests/Format/FormatTest.cpp?rev=218107&r1=218106&r2=218107&view=diff</a><br>
==============================================================================<br>
--- cfe/trunk/unittests/Format/FormatTest.cpp (original)<br>
+++ cfe/trunk/unittests/Format/FormatTest.cpp Fri Sep 19 03:01:25 2014<br>
@@ -3831,12 +3831,9 @@ TEST_F(FormatTest, FormatsBuilderPattern<br>
" .aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa<\n"<br>
" aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa>();");<br>
<br>
- // Prefer not to break after empty parentheses ...<br>
+ // Prefer not to break after empty parentheses.<br>
verifyFormat("FirstToken->WhitespaceRange.getBegin().getLocWithOffset(\n"<br>
" First->LastNewlineOffset);");<br>
- // ... unless nested.<br>
- verifyFormat("f(FirstToken->WhitespaceRange.getBegin()\n"<br>
- " .getLocWithOffset(First->LastNewlineOffset));");<br>
}<br>
<br>
TEST_F(FormatTest, BreaksAccordingToOperatorPrecedence) {<br>
<br>
<br>
_______________________________________________<br>
cfe-commits mailing list<br>
<a href="mailto:cfe-commits@cs.uiuc.edu">cfe-commits@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits</a><br>
</blockquote></div>