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

via cfe-commits cfe-commits at lists.llvm.org
Sun Oct 6 02:00:47 PDT 2024


================
@@ -15661,12 +15661,16 @@ TreeTransform<Derived>::TransformCXXFoldExpr(CXXFoldExpr *E) {
       return true;
   }
 
+  if (*NumExpansions == 1) {
----------------
cor3ntin wrote:

Should we set the flag unconditionally (regardless of the number of expansions)?

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


More information about the cfe-commits mailing list