[clang-tools-extra] [clang-tidy] Add a new check 'replace-with-string-view' (PR #172170)

via cfe-commits cfe-commits at lists.llvm.org
Sat Dec 13 18:17:32 PST 2025


================
@@ -244,6 +244,12 @@ New checks
   Finds virtual function overrides with different visibility than the function
   in the base class.
 
+- New :doc:`performance-replace-with-string-view
+  <clang-tidy/checks/performance/replace-with-string-view>` check.
+
+  Detects functions returning std::[w|u8|u16|u32]string where
+  return type can be changed to std::[...]string_view.
----------------
EugeneZelenko wrote:

```suggestion
  Detects functions returning ``std::[w|u8|u16|u32]string`` where
  return type can be changed to ``std::[...]string_view``.
```

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


More information about the cfe-commits mailing list