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

Zinovy Nis via cfe-commits cfe-commits at lists.llvm.org
Sat Jan 10 11:09:37 PST 2026


irishrover wrote:

> A low-effort but safe fix would be to always wrap the replacement in std::string_view(...) (or usage of sv suffix if appropriate). WDYT?

I'd leave it as it is. 
Because overriding ``std::string_view`` + ``char*`` is a bad pattern anyway.  Suffix ""sv is C++20-and-later only. And wrapping with ``std::string_view(...)`` will make the code too noisy IMO.



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


More information about the cfe-commits mailing list