[clang] [OpenMP] Support capturing structured bindings in OpenMP regions. (PR #190832)
Alexey Bataev via cfe-commits
cfe-commits at lists.llvm.org
Sun May 24 10:53:13 PDT 2026
================
@@ -5440,7 +5444,8 @@ 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>(DE->getDecl()) && !isa<BindingDecl>(DE->getDecl()))) &&
----------------
alexey-bataev wrote:
```suggestion
!isa<VarDecl,BindingDecl>(DE->getDecl()) &&
```
https://github.com/llvm/llvm-project/pull/190832
More information about the cfe-commits
mailing list