[clang] [CIR] Evaluate VLA bounds for a static local of variably modified type (PR #214926)

Erich Keane via cfe-commits cfe-commits at lists.llvm.org
Mon Aug 10 09:49:45 PDT 2026


================
@@ -725,10 +725,8 @@ void CIRGenFunction::emitStaticVarDecl(const VarDecl &d,
   // We can't have a VLA here, but we can have a pointer to a VLA,
   // even though that doesn't really make any sense.
   // Make sure to evaluate VLA bounds now so that we have them for later.
-  if (d.getType()->isVariablyModifiedType()) {
-    cgm.errorNYI(d.getSourceRange(),
-                 "emitStaticVarDecl: variably modified type");
-  }
+  if (d.getType()->isVariablyModifiedType())
+    emitVariablyModifiedType(d.getType());
----------------
erichkeane wrote:

This doesn't have to 'return' here? 

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


More information about the cfe-commits mailing list