================ @@ -20224,6 +20224,8 @@ void Sema::DiagnoseEqualityWithExtraParens(ParenExpr *ParenE) { return; Expr *E = ParenE->IgnoreParens(); + if (ParenE->isProducedByFoldExpansion() && ParenE->getSubExpr() == E) + return; ---------------- erichkeane wrote:
So we would expect htis to still diagnose in a case where: `if (((a ==b )) or ...` . Note hte extra parens there. Does this still work? My point being, perhaps we have to strip off this set of parens before calling this function instead. https://github.com/llvm/llvm-project/pull/110761 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits