================
@@ -97,11 +97,12 @@ AST_MATCHER_FUNCTION_P(StatementMatcher, 
isConstRefReturningMethodCall,
       hasCanonicalType(recordType(hasDeclaration(namedDecl(
           unless(matchers::matchesAnyListedName(ExcludedContainerTypes))))));
 
-  return expr(
-      anyOf(cxxMemberCallExpr(callee(MethodDecl), on(OnExpr),
-                              thisPointerType(ReceiverType)),
-            cxxOperatorCallExpr(callee(MethodDecl), hasArgument(0, OnExpr),
-                                hasArgument(0, hasType(ReceiverType)))));
+  return expr(anyOf(
+      cxxMemberCallExpr(callee(MethodDecl), on(OnExpr),
+                        thisPointerType(ReceiverType)),
+      cxxOperatorCallExpr(
+          callee(MethodDecl), hasArgument(0, ignoringParenImpCasts(OnExpr)),
+          hasArgument(0, ignoringParenImpCasts(hasType(ReceiverType))))));
----------------
5chmidti wrote:

This `ignoringParenImpCasts` shouldn't be needed

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

Reply via email to