[clang] [OpenMP] Support capturing structured bindings in OpenMP regions. (PR #190832)
Alexey Bataev via cfe-commits
cfe-commits at lists.llvm.org
Wed Jun 24 08:49:34 PDT 2026
================
@@ -3597,6 +3597,72 @@ static bool canEmitSpuriousReferenceToVariable(CodeGenFunction &CGF,
}
}
+/// Emit an LValue for a structured binding captured in an OpenMP region.
+/// Handles extracting individual bindings from the captured decomposed
+/// declaration (struct fields, array elements, etc.).
+LValue CodeGenFunction::EmitOMPCapturedBindingLValue(const BindingDecl *BD) {
----------------
alexey-bataev wrote:
Function still skips pieces the VarDecl path handles (nontemporal SIMD annotation, reference unwrapping edge cases). Fragile long-term. A follow-up to route through EmitDeclRefLValue on the decomposed storage + EmitLValue(BD->getBinding()) would be cleaner.
https://github.com/llvm/llvm-project/pull/190832
More information about the cfe-commits
mailing list