================ @@ -18933,12 +18945,34 @@ static bool actOnOMPReductionKindClause( reportOriginalDsa(S, Stack, D, DVar); continue; } + // OpenMP 6.0 [ 7.6.10 ] + // Support Reduction over private variables with reduction clause. + // A list item in a reduction clause can now be private in the enclosing + // context. For orphaned constructs it is assumed to be shared unless the + // original(private) modifier appears in the clause. + DVar = Stack->getImplicitDSA(D, true); + bool IsOrphaned = false; + OpenMPDirectiveKind CurrDir = Stack->getCurrentDirective(); + OpenMPDirectiveKind ParentDir = Stack->getParentDirective(); + // Check if the construct is orphaned (has no enclosing OpenMP context) + IsOrphaned = ParentDir == OMPD_unknown; + // OpenMP 6.0: Private DSA check + IsPrivate = + (S.getLangOpts().OpenMP > 52) && ---------------- alexey-bataev wrote:
Extra parens https://github.com/llvm/llvm-project/pull/129938 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits