[clang-tools-extra] [clang-tidy] Rename performance-faster-string-find to performance-prefer-single-char-overloads (PR #186946)

Zeyi Xu via cfe-commits cfe-commits at lists.llvm.org
Sun Mar 29 21:54:04 PDT 2026


================
@@ -1,30 +1,10 @@
 .. title:: clang-tidy - performance-faster-string-find
+.. meta::
+   :http-equiv=refresh: 5;URL=prefer-single-char-overloads.html
 
 performance-faster-string-find
 ==============================
 
-Optimize calls to ``std::string::find()`` and friends when the needle passed is
-a single character string literal. The character literal overload is more
-efficient.
-
-Examples:
-
-.. code-block:: c++
-
-  str.find("A");
-
-  // becomes
-
-  str.find('A');
-
-Options
--------
-
-.. option:: StringLikeClasses
-
-   Semicolon-separated list of names of string-like classes. By default only
-   ``::std::basic_string`` and ``::std::basic_string_view`` are considered.
-   Within these classes, the check will only consider member functions named
-   ``find``, ``rfind``, ``find_first_of``, ``find_first_not_of``,
-   ``find_last_of``, ``find_last_not_of``, ``starts_with``, ``ends_with``,
-   ``contains``, or ``operator+=``.
+The `performance-faster-string-find check` is an alias, please see
----------------
zeyi2 wrote:

Thanks!

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


More information about the cfe-commits mailing list