[PATCH] D143342: [clang-tidy] Support std::format and std::print in readability-redundant-string-cstr

Mike Crowe via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sun Feb 12 07:09:11 PST 2023


mikecrowe updated this revision to Diff 496758.
mikecrowe added a comment.

Incorporate feedback from Nathan James:

- Simplify callExpr pattern in matcher.
- Use `forEachArgumentWithParam` so that check works on all arguments and remove mentions of previous limitation in commit message and documentation.
- Make lit test use closer approximation to standard first argument for `std::format` and `std::print` rather than `const char *`.
- Add wide-character string tests.
- Other minor improvements to tests.


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

https://reviews.llvm.org/D143342

Files:
  clang-tools-extra/clang-tidy/readability/RedundantStringCStrCheck.cpp
  clang-tools-extra/docs/ReleaseNotes.rst
  clang-tools-extra/test/clang-tidy/checkers/readability/redundant-string-cstr.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D143342.496758.patch
Type: text/x-patch
Size: 11049 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20230212/bf003af4/attachment-0001.bin>


More information about the cfe-commits mailing list