[clang] [CIR] Upstream global initialization for ComplexType (PR #141369)
Henrich Lauko via cfe-commits
cfe-commits at lists.llvm.org
Sun May 25 11:02:11 PDT 2025
================
@@ -231,7 +231,8 @@ static LogicalResult checkConstantTypes(mlir::Operation *op, mlir::Type opType,
}
if (isa<cir::ZeroAttr>(attrType)) {
- if (isa<cir::RecordType, cir::ArrayType, cir::VectorType>(opType))
+ if (isa<cir::RecordType, cir::ArrayType, cir::VectorType, cir::ComplexType>(
+ opType))
return success();
return op->emitOpError("zero expects struct or array type");
----------------
xlauko wrote:
this error message mentions only `struct` or `array` though `vector` and `complex` are also admissible
https://github.com/llvm/llvm-project/pull/141369
More information about the cfe-commits
mailing list