================ @@ -51,6 +53,12 @@ void ContainerContainsCheck::registerMatchers(MatchFinder *Finder) { const auto Literal0 = integerLiteral(equals(0)); const auto Literal1 = integerLiteral(equals(1)); + const auto StringLikeClass = cxxRecordDecl( + hasAnyName("::std::basic_string", "::std::basic_string_view", + "::absl::string_view")); ---------------- nicovank wrote:
I'm a fan of not hard-coding any classes when possible. IMO it's fine to match `npos` without checking the DeclContext, it's not a common name. https://github.com/llvm/llvm-project/pull/110351 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits