[clang-tidy] Support std::string_view in readability-redundant-string-cstr
authorTamas Berghammer <tamas@hudson-trading.com>
Mon, 2 Jan 2023 11:24:00 +0000 (06:24 -0500)
committerTamas Berghammer <tamas@hudson-trading.com>
Mon, 2 Jan 2023 11:24:00 +0000 (06:24 -0500)
commitf325b5b8cb1d6c16dd04c88380caea7b0a7750eb
tree3533aef79d779c9858c768f6c8eb326c3ca6e02c
parentcf487cce6f64fe2a397d43108bfdbad01a8754fb
[clang-tidy] Support std::string_view in readability-redundant-string-cstr

Previously we were matching constructor calls for std::string and
llvm::StringRef and this change extends this set with including
std::string_view as well.

Reviewed By: njames93, carlosgalvezp

Differential Revision: https://reviews.llvm.org/D140018
clang-tools-extra/clang-tidy/readability/RedundantStringCStrCheck.cpp
clang-tools-extra/docs/ReleaseNotes.rst
clang-tools-extra/test/clang-tidy/checkers/readability/redundant-string-cstr.cpp