PriMee added inline comments.

================
Comment at: lib/Format/UnwrappedLineFormatter.cpp:286
     }
+    if (TheLine->Last->is(tok::l_brace) &&
+        TheLine->First != TheLine->Last &&
----------------
PriMee wrote:
> krasimir wrote:
> > No tests fail if this `if` statement gets removed. Please either remove it 
> > or add a test for it.
> That's true. Why is that? Without this if statement tests would pass because 
> our block would have been handled by the construct I have mentioned in 
> problem description (Line 311). Adding a very similar test case with 
> BraceWrapping.AfterFunction flag changed would show that we need this if 
> statement. To my mind, it doesn't make sense to add such test case.
Okay, done. Now the test case would fail (Line 449 in FormatTest.cpp would be 
problematic, although in our case should NOT change anything).


https://reviews.llvm.org/D37140



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to