================
@@ -1706,21 +1706,9 @@ LValue CIRGenFunction::emitCastLValue(const CastExpr *e)
{
Address v = lv.getAddress();
if (v.isValid()) {
mlir::Type ty = convertTypeForMem(e->getType());
- if (v.getElementType() != ty) {
- // We have only inspected/reproduced this with complete to incomplete
- // array types, so we do an NYI for other cases, so we can make sure
- // we're doing a conversion we want to be making.
- auto fromTy = dyn_cast<cir::ArrayType>(v.getElementType());
- auto toTy = dyn_cast<cir::ArrayType>(ty);
- if (!fromTy || !toTy ||
- fromTy.getElementType() != toTy.getElementType() ||
- toTy.getSize() != 0)
- cgm.errorNYI(e->getSourceRange(),
- "emitCastLValue NoOp not array-shrink case");
-
+ if (v.getElementType() != ty)
----------------
andykaylor wrote:
I'm concerned that the test you're adding isn't sufficient to satisfy the
concerns @erichkeane had when he added this diagnostic. In particular, line
1721 is subtely different from what classic codegen does here, and I'm not
really sure what effect the difference might have in places where this l-value
is used.
https://github.com/llvm/llvm-project/pull/197531
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits