[PATCH] D24400: Also cleanup comments around redundant colons/commas in format::cleanup.

Daniel Jasper via cfe-commits cfe-commits at lists.llvm.org
Fri Sep 9 10:51:54 PDT 2016

djasper accepted this revision.
djasper added a comment.
This revision is now accepted and ready to land.

One remark, otherwise looks good.

Comment at: lib/Format/Format.cpp:1136
@@ +1135,3 @@
+        for (auto *Tok = Left->Next; Tok && Tok != Right; Tok = Tok->Next)
+          if (Tok->is(tok::comment))
+            deleteToken(Tok);
Hm. I think this "if" actually doesn't change behavior. If we remove it, we'd just add already deleted tokens to the set again, which shouldn't hurt (and we do it for comments at the moment). I'd just remove this line.


More information about the cfe-commits mailing list