[PATCH] D149280: [clang-tidy] Add modernize-printf-to-std-print check

Mike Crowe via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sun Jun 25 09:54:14 PDT 2023


mikecrowe added inline comments.


================
Comment at: clang-tools-extra/clang-tidy/modernize/UseStdPrintCheck.cpp:64
+  if (MaybeHeaderToInclude)
+    Options.store(Opts, "PrintHeader", *MaybeHeaderToInclude);
+}
----------------
This is going to write the default value set in the constructor if `ReplacementPrintFunction` is `std::print` or `ReplacementPrintlnFunction` is `std::println` even if `PrintHeader` was not specified in the configuration. I don't know how much of a problem this is.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D149280/new/

https://reviews.llvm.org/D149280



More information about the cfe-commits mailing list