[clang] [Clang] omit parentheses in fold expressions with a single expansion (PR #110761)
Erich Keane via cfe-commits
cfe-commits at lists.llvm.org
Mon Oct 7 06:36:06 PDT 2024
================
@@ -20224,6 +20224,8 @@ void Sema::DiagnoseEqualityWithExtraParens(ParenExpr *ParenE) {
return;
Expr *E = ParenE->IgnoreParens();
+ if (ParenE->isProducedByFoldExpansion() && ParenE->getSubExpr() == E)
+ return;
----------------
erichkeane wrote:
Woops, i see that it is in the tests, so, LGTM!
https://github.com/llvm/llvm-project/pull/110761
More information about the cfe-commits
mailing list