njames93 added a comment. Just a few more points then it should be good to land
================ Comment at: clang-tools-extra/clang-tidy/readability/RedundantStringCStrCheck.cpp:181-190 + + // Detect redundant 'c_str()' calls in parameters passed to std::print and + // std::format. + Finder->addMatcher( + traverse( + TK_AsIs, + callExpr( ---------------- Can this be wrapped in a check to make sure it only runs in c++20 Likewise `::std::print` is only c++23, so maybe: ```lang=c++ getLangOpts().CPlusPlus2B ? hasAnyName("::std::print", "::std::format") : hasAnyName("::std::format") ``` ================ Comment at: clang-tools-extra/test/clang-tidy/checkers/readability/redundant-string-cstr.cpp:1 -// RUN: %check_clang_tidy %s readability-redundant-string-cstr %t +// RUN: %check_clang_tidy -std=c++20 %s readability-redundant-string-cstr %t ---------------- We shouldn't be removing tests from older language standards Can all the changes made to the file be moved into a new file `redundant-string-cstr-cpp20.cpp` Would likely either need to create a second file for c++23 or make use of the check-suffix to run the tests for std::print CHANGES SINCE LAST ACTION https://reviews.llvm.org/D143342/new/ https://reviews.llvm.org/D143342 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits