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.
For example, when removing the second argument of foo(3, 4)
, clang-tidy (correctly) removes the comma to produce foo(3)
.
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.
thanks,
yitzhak