berenm added a comment.

I'm not entirely sure of what was going on, so I rewrote the code a bit, and 
hopefully, more clearly.

================
Comment at: lib/Format/WhitespaceManager.cpp:218
@@ -217,3 +229,1 @@
-  bool AlignedAssignment = false;
-  int PreviousShift = 0;
   for (unsigned i = Start; i != End; ++i) {
----------------
What was the purpose of `PreviousShift`?

================
Comment at: lib/Format/WhitespaceManager.cpp:229
@@ -228,3 +244,3 @@
     assert(Shift >= 0);
-    Changes[i].Spaces += Shift;
     if (i + 1 != Changes.size())
----------------
Why shifting by `Shift` //and then// also by `PreviousShift`?


http://reviews.llvm.org/D12369



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

Reply via email to