[clang-tools-extra] [clang-tidy] Add new performance-use-starts-ends-with check (PR #72385)
Piotr Zegar via cfe-commits
cfe-commits at lists.llvm.org
Thu Nov 16 00:20:31 PST 2023
================
@@ -8,6 +8,10 @@ corresponding ``std::string_view`` methods) result is compared with 0, and
suggests replacing with ``absl::StartsWith()``. This is both a readability and
performance issue.
+``starts_with`` was added as a built-in function on those types in C++20. If
+available, prefer enabling performance-use-starts-ends-with instead of this
----------------
PiotrZSL wrote:
use :doc:`performance-use-starts-ends-with <../performance/use-starts-ends-with>`
https://github.com/llvm/llvm-project/pull/72385
More information about the cfe-commits
mailing list