================ @@ -30,9 +30,9 @@ void UpgradeDurationConversionsCheck::registerMatchers(MatchFinder *Finder) { Finder->addMatcher( cxxOperatorCallExpr( argumentCountIs(2), - hasArgument( - 0, expr(hasType(cxxRecordDecl(hasName("::absl::Duration"))))), - hasArgument(1, expr().bind("arg")), + hasArgument(0, ignoringParenImpCasts(expr(hasType( + cxxRecordDecl(hasName("::absl::Duration")))))), + hasArgument(1, ignoringParenImpCasts(expr().bind("arg"))), ---------------- 5chmidti wrote:
I don't think that we need the `ignoringParenImpCasts` for the 0-th argument, because we want to know if it is called on an `::absl::Duration` and not on something that was implicitly constructed from one. I know that the original `hasArgument` did include the `ignoringParenImpCasts`, but I think its better to leave it out. Thoughts? The `ignoringParenImpCasts` from the 1-st argument can be removed. https://github.com/llvm/llvm-project/pull/89553 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits