[clang] [OpenMP] Support capturing structured bindings in OpenMP regions. (PR #190832)

Alexey Bataev via cfe-commits cfe-commits at lists.llvm.org
Tue Jun 30 08:26:13 PDT 2026


================
@@ -1575,6 +1647,48 @@ void CodeGenFunction::EmitOMPReductionClauseInit(
   auto *IPriv = Privates.begin();
   for (const Expr *IRef : Shareds) {
     const auto *PrivateVD = cast<VarDecl>(cast<DeclRefExpr>(*IPriv)->getDecl());
+    const BindingDecl *BD = nullptr;
----------------
alexey-bataev wrote:

reduction(task:) and reduction(inscan:) and min/max with custom initializers are neither blocked nor tested for bindings, and the task/inscan data paths assume the RedCG-driven layout. Either add tests proving these work or diagnose them as unsupported like array/UDR.

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


More information about the cfe-commits mailing list