================
@@ -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
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits