[clang] [OpenMP] Support capturing structured bindings in OpenMP regions. (PR #190832)
Zahira Ammarguellat via cfe-commits
cfe-commits at lists.llvm.org
Thu Jul 2 11:56:56 PDT 2026
================
@@ -23567,6 +23888,20 @@ static void checkMappableExpressionList(
continue;
}
+ // Check for unsupported structured bindings early.
+ if (!NoDiagnose) {
+ if (const auto *DRE = dyn_cast<DeclRefExpr>(SimpleExpr)) {
+ const DecompositionDecl *DD = nullptr;
+ if (const auto *BD = dyn_cast<BindingDecl>(DRE->getDecl())) {
+ DD = cast<DecompositionDecl>(BD->getDecomposedDecl());
+ } else if (const auto *D =
+ dyn_cast<DecompositionDecl>(DRE->getDecl())) {
+ DD = D;
+ }
+ if (DD && !getOriginalVarOrDiagnose(SemaRef, DD, ELoc))
----------------
zahiraam wrote:
Done.
https://github.com/llvm/llvm-project/pull/190832
More information about the cfe-commits
mailing list