[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


================
@@ -22,9 +22,10 @@ void DurationDivisionCheck::registerMatchers(MatchFinder *Finder) {
       traverse(TK_AsIs,
                implicitCastExpr(
                    hasSourceExpression(ignoringParenCasts(
-                       cxxOperatorCallExpr(hasOverloadedOperatorName("/"),
-                                           hasArgument(0, DurationExpr),
-                                           hasArgument(1, DurationExpr))
+                       cxxOperatorCallExpr(
+                           hasOverloadedOperatorName("/"),
+                           hasArgument(0, ignoringParenImpCasts(DurationExpr)),
+                           hasArgument(1, ignoringParenImpCasts(DurationExpr)))
----------------
5chmidti wrote:

I don't think we need to ignore implicit nodes here

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


More information about the cfe-commits mailing list