[clang-tools-extra] [clang-tidy] Add a new check 'performance-string-view-conversions' (PR #174288)

Victor Chernyakin via cfe-commits cfe-commits at lists.llvm.org
Thu Jan 8 15:11:38 PST 2026


================
@@ -265,6 +265,13 @@ New checks
   Finds virtual function overrides with different visibility than the function
   in the base class.
 
+- New :doc:`performance-string-view-conversions
+  <clang-tidy/checks/performance/string-view-conversions>` check.
+
+  Looks for redundant conversions from ``std::[w|u8|u16|u32]string_view`` to
+  ``std::[...]string`` in call expressions expecting ``std::[...]string_view``.
+  And fixes them.
----------------
localspook wrote:

```suggestion
  Finds and removes redundant conversions from ``std::[w|u8|u16|u32]string_view`` to
  ``std::[...]string`` in call expressions expecting ``std::[...]string_view``.
```

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


More information about the cfe-commits mailing list