aaron.ballman added a comment.

> It seems, when they are apply directly from clang-tidy, the RefactoringTool 
> engine is smart enough to remove trailing tokens. However, when fixes are 
> exported, clang-apply-replacements cannot do the same trick and will lead 
> trailing commas and colon

Is there a way to make clang-apply-replacements smarter rather than forcing 
every check to jump through hoops? I'm worried that if we have to fix 
individual checks we'll just run into the same bug later.



================
Comment at: clang-tidy/modernize/UseDefaultMemberInitCheck.cpp:26
+                                           tok::TokenKind K) {
+  for (;;) {
+    Token Tok = utils::lexer::getPreviousToken(*Context, Location);
----------------
Eugene.Zelenko wrote:
> Please use while (true) instead.
Better still, don't use an infinite loop.


Repository:
  rCTE Clang Tools Extra

https://reviews.llvm.org/D43500



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

Reply via email to