[clang-tools-extra] [clang-tidy] Fix assert in modernize-use-std-format/print (PR #94104)

Mike Crowe via cfe-commits cfe-commits at lists.llvm.org
Mon Jun 3 05:27:50 PDT 2024


================
@@ -20,6 +20,11 @@ namespace clang::tidy::modernize {
 
 namespace {
 AST_MATCHER(StringLiteral, isOrdinary) { return Node.isOrdinary(); }
+AST_MATCHER(QualType, isSimpleChar) {
+  const auto ActualType = Node.getTypePtr();
+  return ActualType->isSpecificBuiltinType(BuiltinType::Char_S) ||
+         ActualType->isSpecificBuiltinType(BuiltinType::Char_U);
+}
----------------
mikecrowe wrote:

OK. I probably ought to do the same with `isOrdinary` too, but I'll do that in a separate change.

https://github.com/llvm/llvm-project/pull/94104


More information about the cfe-commits mailing list