================
@@ -986,7 +986,7 @@ class LineJoiner {
   void join(AnnotatedLine &A, const AnnotatedLine &B) {
     assert(!A.Last->Next);
     assert(!B.First->Previous);
-    if (B.Affected)
+    if (B.Affected || (B.LeadingEmptyLinesAffected && 
A.Last->Children.empty()))
----------------
tJener wrote:

I suppose it depends. It's unclear to me what the contract of `join` is 
supposed to be. If it is supposed to merge two arbitrary `AnnotatedLine`s, then 
it seems like we should keep the check for `Children.empty()` in order to be 
consistent with `AffectedRangeManager`. If instead one of the preconditions for 
`join` is that `A.Last->Children.empty()`, then I'd rather assert on that 
instead of only dropping the condition on the `if`.

That said, I'm just trying to fix a bug that's blocking progress on other 
stuff, so I'll just do whatever you want me to do here.

https://github.com/llvm/llvm-project/pull/146761
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to