aaron.ballman added inline comments.
================ Comment at: clang-tools-extra/test/clang-tidy/checkers/readability-redundant-string-init.cpp:25 +struct basic_string_view { + using size_type = unsigned; + ---------------- nit: `using size_type = decltype(sizeof(0));` ================ Comment at: clang-tools-extra/test/clang-tidy/checkers/readability-redundant-string-init.cpp:30 + basic_string_view(const C *, size_type); + basic_string_view(const C *, const A &a = A()); + template <class It, class End> ---------------- This constructor doesn't exist according to the standard: http://eel.is/c++draft/string.view.template.general ================ Comment at: clang-tools-extra/test/clang-tidy/checkers/readability-redundant-string-init.cpp:65 +void fview() { + std::string_view a = ""; ---------------- Can you also add tests for `wstring_view`? Also, perhaps one for `std::string_view foo{};` (to remove the spurious `{}`) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D91009/new/ https://reviews.llvm.org/D91009 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits