<div dir="ltr">I think the cleanup is done by cleanupAroundReplacements (clang-tidy formats the replacements before applying them).</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Jul 29, 2019 at 3:14 PM Yitzhak Mandelbaum via cfe-dev <<a href="mailto:cfe-dev@lists.llvm.org">cfe-dev@lists.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">If I create a removal FixItHint in clang-tidy to remove a function argument (that is, the `CharSourceRange` in the cal to FixItHint::CreateRemoval() spans a function-call argument), the associated comma for that argument (if any) is removed as well. </div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">For example, when removing the second argument of `foo(3, 4)`, clang-tidy (correctly) removes the comma to produce `foo(3)`.</div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">I'd like to understand *where* that happens in the code. I've looked through much of the code involved and searched the codebase for `tok::comma`, but was completely unable to discover the source of this modification.</div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">thanks,</div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">yitzhak</div></div>
_______________________________________________<br>
cfe-dev mailing list<br>
<a href="mailto:cfe-dev@lists.llvm.org" target="_blank">cfe-dev@lists.llvm.org</a><br>
<a href="https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev" rel="noreferrer" target="_blank">https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev</a><br>
</blockquote></div>