[clang] [OpenMP] Support capturing structured bindings in OpenMP regions. (PR #190832)
Alexey Bataev via cfe-commits
cfe-commits at lists.llvm.org
Fri Jul 10 13:49:25 PDT 2026
================
@@ -4028,6 +4221,12 @@ class DSAAttrChecker final : public StmtVisitor<DSAAttrChecker, void> {
if (!Stack->isImplicitDefaultFirstprivateFD(VD))
return;
VD = VD->getCanonicalDecl();
+ // Skip BindingDecls and DecompositionDecls - they should be handled
+ // through explicit mapping of the original variable or as member
+ // expressions. When bindings are captured, the original variable
+ // is what needs to be mapped, not the decomposition itself.
+ if (isa<BindingDecl>(VD) || isa<DecompositionDecl>(VD))
----------------
alexey-bataev wrote:
```suggestion
if (isa<DecompositionDecl>(VD))
```
BindingDecl is not derived from VarDecl
https://github.com/llvm/llvm-project/pull/190832
More information about the cfe-commits
mailing list