================
@@ -16,13 +17,13 @@ using namespace clang::ast_matchers;
namespace clang::tidy::modernize {
static StringRef toStringViewTypeStr(StringRef Type) {
- if (Type.contains("wchar_t"))
+ if (Type.contains("wchar_t") || Type.ends_with("wstring"))
return "std::wstring_view";
- if (Type.contains("char8_t"))
+ if (Type.contains("char8_t") || Type.ends_with("u8string"))
return "std::u8string_view";
- if (Type.contains("char16_t"))
+ if (Type.contains("char16_t") || Type.ends_with("u16string"))
return "std::u16string_view";
- if (Type.contains("char32_t"))
+ if (Type.contains("char32_t") || Type.ends_with("u32string"))
----------------
vbvictor wrote:
Why `Type.ends_with` was added?
AFAIK there are no new test-cases for it
https://github.com/llvm/llvm-project/pull/172170
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits