================
@@ -90,8 +90,100 @@ class ConstExprEmitter
   }
 
   mlir::Attribute VisitCastExpr(CastExpr *e, QualType destType) {
-    cgm.errorNYI(e->getBeginLoc(), "ConstExprEmitter::VisitCastExpr");
-    return {};
+    if (const auto *ece = dyn_cast<ExplicitCastExpr>(e))
+      cgm.errorNYI(e->getBeginLoc(),
+                   "ConstExprEmitter::VisitCastExpr explicit cast");
+    Expr *subExpr = e->getSubExpr();
+
+    switch (e->getCastKind()) {
+    case CK_HLSLArrayRValue:
----------------
andykaylor wrote:

I can't see why we would need to do anything for them. Maybe the incubator 
placed them here at a time when OGCG was doing something with them? I believe 
`Evaluate` mentioned in the comment on line 136 is the AST's Evaluate function, 
which does seem to handle these cases.

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