[clang-tools-extra] [clang-tidy] support string::contains (PR #110351)
Tommy Chen via cfe-commits
cfe-commits at lists.llvm.org
Fri Oct 4 21:31:01 PDT 2024
================
@@ -94,12 +102,14 @@ void ContainerContainsCheck::registerMatchers(MatchFinder *Finder) {
binaryOperator(hasLHS(Literal1), hasOperatorName(">"), hasRHS(CountCall))
.bind("negativeComparison"));
- // Find membership tests based on `find() == end()`.
+ // Find membership tests based on `find() == end() or find() == npos`.
----------------
dl8sd11 wrote:
Thanks for catching.
https://github.com/llvm/llvm-project/pull/110351
More information about the cfe-commits
mailing list