[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
================
@@ -0,0 +1,34 @@
+//===----------------------------------------------------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_PERFORMANCE_STRINGVIEWCONVERSIONSCHECK_H
+#define LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_PERFORMANCE_STRINGVIEWCONVERSIONSCHECK_H
+
+#include "../ClangTidyCheck.h"
+
+namespace clang::tidy::performance {
+
+/// Looks for redundant conversions from std::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::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