[clang] [Clang] omit parentheses in fold expressions with a single expansion (PR #110761)

Erich Keane via cfe-commits cfe-commits at lists.llvm.org
Thu Oct 3 08:24:32 PDT 2024


================
@@ -15566,6 +15566,14 @@ TreeTransform<Derived>::TransformCXXFoldExpr(CXXFoldExpr *E) {
       return true;
   }
 
+  // When there's only one expansion, the parentheses can be safely eliminated
+  // to avoid any extra redundancy that may result in incorrect checks
----------------
erichkeane wrote:

```suggestion
  // to avoid any extra redundancy that may result in incorrect checks.
```

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


More information about the cfe-commits mailing list