================ @@ -17219,10 +17219,10 @@ static bool UsefulToPrintExpr(const Expr *E) { if (const auto *UnaryOp = dyn_cast<UnaryOperator>(E)) return UsefulToPrintExpr(UnaryOp->getSubExpr()); - // Ignore nested binary operators. This could be a FIXME for improvements - // to the diagnostics in the future. - if (isa<BinaryOperator>(E)) - return false; + // Only print nested arithmetic operators. + if (const auto *BO = dyn_cast<BinaryOperator>(E)) + return (BO->isShiftOp() || BO->isAdditiveOp() || BO->isMultiplicativeOp() || + BO->isBitwiseOp()); ---------------- tbaederr wrote:
Those are the ones we don't want to have, because we'd (ideally) have to show multiple comparisons and not just the one https://github.com/llvm/llvm-project/pull/71671 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits