[clang] [OpenMP] Support capturing structured bindings in OpenMP regions. (PR #190832)
Erich Keane via cfe-commits
cfe-commits at lists.llvm.org
Thu Apr 30 06:13:51 PDT 2026
================
@@ -3771,6 +3771,99 @@ LValue CodeGenFunction::EmitDeclRefLValue(const DeclRefExpr *E) {
// an enclosing scope.
if (const auto *BD = dyn_cast<BindingDecl>(ND)) {
if (E->refersToEnclosingVariableOrCapture()) {
+ // OpenMP case: binding was captured via its decomposed decl.
+ if (auto *DD = dyn_cast<VarDecl>(BD->getDecomposedDecl())) {
----------------
erichkeane wrote:
This needs to be split off into its own function.
https://github.com/llvm/llvm-project/pull/190832
More information about the cfe-commits
mailing list