================
@@ -118,7 +210,26 @@ class ConstExprEmitter
   }
 
   mlir::Attribute VisitInitListExpr(InitListExpr *ile, QualType t) {
-    cgm.errorNYI(ile->getBeginLoc(), "ConstExprEmitter::VisitInitListExpr");
+    if (ile->isTransparent())
+      return Visit(ile->getInit(0), t);
+
+    if (ile->getType()->isArrayType()) {
+      // If we return null here, the non-constant initializer will take care of
+      // it, but we would prefer to handle it here.
+      assert(!cir::MissingFeatures::constEmitterArrayILE());
+      return {};
+    }
+
+    if (ile->getType()->isRecordType())
+      cgm.errorNYI(ile->getBeginLoc(), "ConstExprEmitter: record ILE");
----------------
andykaylor wrote:

I've been using MissingFeature for places where we need to do something but 
either can't check for the conditions where we need to do it yet (because the 
check uses constructs that haven't been upstreamed yet) or we don't want to 
issue an error (as in the other two cases here). So, I don't think it would add 
anything here.

I'll add the explicit return.

https://github.com/llvm/llvm-project/pull/138222
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to