[clang-tools-extra] [clang-tidy] fix false positive of parentheses removal for overloaded operator (PR #192254)

Gaurav Dhingra via cfe-commits cfe-commits at lists.llvm.org
Wed May 20 05:18:48 PDT 2026


================
@@ -58,7 +58,9 @@ void RedundantParenthesesCheck::registerMatchers(MatchFinder *Finder) {
                     memberExpr(), callExpr())),
----------------
gxyd wrote:

> I think this is a better approach. Consider other operators, e.g. !(lhs & rhs).

You are right about this, I missed thinking about this case. I've added robust testing in my latest changes.

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


More information about the cfe-commits mailing list