Hi Malcolm, I will look into fixing the two cases only. argumentCountIs(1) is sufficient to narrow the matching to only string compare with one argument.
Best regards, Mads Ravn On Mon, Dec 12, 2016 at 10:38 AM Malcolm Parsons via Phabricator < revi...@reviews.llvm.org> wrote: > malcolm.parsons added inline comments. > > > ================ > Comment at: clang-tidy/misc/StringCompareCheck.cpp:25 > + callee(cxxMethodDecl(hasName("compare"), > + ofClass(classTemplateSpecializationDecl( > + hasName("::std::basic_string"))))), > ---------------- > malcolm.parsons wrote: > > malcolm.parsons wrote: > > > This needs to check that it's one of the single parameter overloads of > compare. > > Add `parameterCountIs(1)`. > Actually, the `argumentCountIs(1)` below should be sufficient. > > > https://reviews.llvm.org/D27210 > > > >
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits