[clang] [CIR] Upstream support for function-level variable decompositions (PR #151073)

Andy Kaylor via cfe-commits cfe-commits at lists.llvm.org
Tue Jul 29 09:39:06 PDT 2025


================
@@ -584,6 +584,12 @@ LValue CIRGenFunction::emitDeclRefLValue(const DeclRefExpr *e) {
     return lv;
   }
 
+  if (const auto *bd = dyn_cast<BindingDecl>(nd)) {
+    assert(!e->refersToEnclosingVariableOrCapture() &&
+           !cir::MissingFeatures::lambdaCaptures());
----------------
andykaylor wrote:

Can you make this use errorNYI instead?

https://github.com/llvm/llvm-project/pull/151073


More information about the cfe-commits mailing list