[clang] [clang-tools-extra] [llvm] Add ``ignoringParenImpCasts`` in arguments of hasArgument (PR #89553)

Julian Schmidt via llvm-commits llvm-commits at lists.llvm.org
Wed May 1 12:23:42 PDT 2024


================
@@ -75,9 +76,10 @@ void UpgradeDurationConversionsCheck::registerMatchers(MatchFinder *Finder) {
                    hasParent(functionTemplateDecl()),
                    unless(hasTemplateArgument(0, refersToType(builtinType()))),
                    hasName("::absl::operator*"))),
-               argumentCountIs(2), hasArgument(0, expr().bind("arg")),
-               hasArgument(1, expr(hasType(
-                                  cxxRecordDecl(hasName("::absl::Duration"))))))
+               argumentCountIs(2),
+               hasArgument(0, ignoringParenImpCasts(expr().bind("arg"))),
+               hasArgument(1, ignoringParenImpCasts(expr(hasType(cxxRecordDecl(
+                                  hasName("::absl::Duration")))))))
----------------
5chmidti wrote:

Same as the first comment in this file

https://github.com/llvm/llvm-project/pull/89553


More information about the llvm-commits mailing list