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

Alexey Bataev via cfe-commits cfe-commits at lists.llvm.org
Thu Jun 18 06:37:17 PDT 2026


================
@@ -5440,7 +5467,7 @@ getPrivateItem(Sema &S, Expr *&RefExpr, SourceLocation &ELoc,
   RefExpr = RefExpr->IgnoreParenImpCasts();
   auto *DE = dyn_cast_or_null<DeclRefExpr>(RefExpr);
   auto *ME = dyn_cast_or_null<MemberExpr>(RefExpr);
-  if ((!DE || !isa<VarDecl>(DE->getDecl())) &&
+  if ((!DE || (!isa<VarDecl, BindingDecl>(DE->getDecl()))) &&
----------------
alexey-bataev wrote:

```suggestion
  if ((!DE || !isa<VarDecl, BindingDecl>(DE->getDecl())) &&
```

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


More information about the cfe-commits mailing list