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

Eric Liu via cfe-commits cfe-commits at lists.llvm.org
Fri Sep 9 10:58:14 PDT 2016

ioeric added inline comments.

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);
djasper wrote:
> 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.
Wow, from 20 LOC to 2 LOC! Thanks!


More information about the cfe-commits mailing list