[clang-tools-extra] [clang-tidy] Add new modernize-string-find-startswith check (PR #72385)
Piotr Zegar via cfe-commits
cfe-commits at lists.llvm.org
Wed Nov 15 07:38:11 PST 2023
================
@@ -181,6 +181,14 @@ New checks
points in a coroutine. Such hostile types include scoped-lockable types and
types belonging to a configurable denylist.
+- New :doc:`modernize-string-find-startswith
+ <clang-tidy/checks/modernize/string-find-startswith>` check.
+
+ Checks whether a ``std::string::find()`` or ``std::string::rfind()`` (and
+ corresponding ``std::string_view`` methods) result is compared with 0, and
+ suggests replacing with ``starts_with()``. This is both a readability and a
----------------
PiotrZSL wrote:
"This is both a readability and a performance issue." no need for that in release notes
https://github.com/llvm/llvm-project/pull/72385
More information about the cfe-commits
mailing list