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

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


================
@@ -62,9 +63,9 @@ void UpgradeDurationConversionsCheck::registerMatchers(MatchFinder *Finder) {
                    unless(hasTemplateArgument(0, refersToType(builtinType()))),
                    hasAnyName("::absl::operator*", "::absl::operator/"))),
                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:

Same as the first comment in this file

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


More information about the cfe-commits mailing list