[clang-tools-extra] [clang-tidy] Apply DeMorgan to overloaded operator in the 'readability-simplify-boolean-expr' check (PR #164141)
Yanzuo Liu via cfe-commits
cfe-commits at lists.llvm.org
Sun Oct 19 00:54:30 PDT 2025
================
@@ -930,6 +950,17 @@ static bool flipDemorganSide(SmallVectorImpl<FixItHint> &Fixes,
return flipDemorganBinaryOperator(Fixes, Ctx, BinOp, OuterBO, Paren);
}
}
+ if (const auto *OpCall = dyn_cast<CXXOperatorCallExpr>(E);
+ OpCall && OpCall->isInfixBinaryOp()) {
+ return flipDemorganOverloadedBinaryOperator(Fixes, Ctx, OpCall, OuterBO);
+ }
+ if (const auto *Paren = dyn_cast<ParenExpr>(E)) {
+ if (const auto *OpCall = dyn_cast<CXXOperatorCallExpr>(E);
----------------
zwuis wrote:
What's going on here? `E` is both `ParenExpr` and `CXXOperatorCallexpr`?
https://github.com/llvm/llvm-project/pull/164141
More information about the cfe-commits
mailing list