================
@@ -58,7 +58,9 @@ void RedundantParenthesesCheck::registerMatchers(MatchFinder 
*Finder) {
                     memberExpr(), callExpr())),
                 unless(anyOf(isInMacro(),
                              // sizeof(...) is common used.
-                             hasParent(unaryExprOrTypeTraitExpr()))))
+                             hasParent(unaryExprOrTypeTraitExpr()),
+                             allOf(hasDescendant(cxxOperatorCallExpr()),
+                                   hasParent(binaryOperator())))))
----------------
gxyd wrote:

Yes, you were right about this. I've used `has` now instead of `hasDescendant` 
and added a test case which would've created a false-negative with 
`hasDescendant` use instead of `has`.

I think this PR is now ready for a review.

https://github.com/llvm/llvm-project/pull/192254
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to