Add a new clang-tidy check that converts absl::StrFormat (and similar
functions) to std::format (and similar functions.)
Split the configuration of FormatStringConverter out to a separate
Configuration class so that we don't risk confusion by passing two
boolean configuration parameters into the constructor. Add
AllowTrailingNewlineRemoval option since we never want to remove
trailing newlines in this check.
This matcher also matches the operator+ call in:
which causes an assertion failure:
when the StrFormatLikeFunctions option is set to an unqualified name:
MatchesAnyListedNameMatcher::NameMatcher::match calls NamedDecl.getName() which presumably raises the assertion due to the operator+ not having a name (that's mentioned in the source anyway.)
I'm unsure whether I should be narrowing the matcher here so that it guaranteed to not try calling matchesAnyListedName on something that lacks a name, or whether MatchesAnyListedNameMatcher ought to be more tolerant of being called in such situations.
I note that HasNameMatcher has rather more elaborate code for generating the name than MatchesAnyListedNameMatcher does.
This problem also affects modernize-use-std-print, but due to the need for there to be no return value in that check it requires somewhat-unlikely code like:
Do you have any advice? Given that this problem affects a check that has already landed should I open a bug?