djasper added inline comments.

================
Comment at: lib/Format/Format.cpp:1141
@@ -1134,1 +1140,3 @@
         deleteToken(DeleteLeft ? Left : Right);
+        // Delete all comments between `Left` and `Right`.
+        for (auto *Comment : Comments)
----------------
Couldn't you just do:

  for (auto *Tok = Left->Next; Tok && Tok != Right; Tok = Tok->Next)
    if (Tok->is(tok::comment))
      deleteToken(Comment);

That way you wouldn't have to store the comments in a vector.


https://reviews.llvm.org/D24400



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

Reply via email to