[Mlir-commits] [mlir] [mlir][affine] cleanup deprecated T.cast style functions (PR #71269)

Aart Bik llvmlistbot at llvm.org
Thu Nov 9 16:16:47 PST 2023


================
@@ -438,14 +438,15 @@ SparseTensorEncodingAttr::tranlateShape(ArrayRef<int64_t> srcShape,
     // Do constant propagation on the affine map.
     AffineExpr evalExp =
         simplifyAffineExpr(exp.replaceDims(dimRep), srcShape.size(), 0);
-    if (auto c = evalExp.dyn_cast<AffineConstantExpr>()) {
+    // use llvm namespace here to avoid ambiguity
+    if (auto c = llvm::dyn_cast<AffineConstantExpr>(evalExp)) {
----------------
aartbik wrote:

can we avoid the llvm:: prefix if possible? it does not seem to be needed below, so I would like to keep the shorter, consistent version

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


More information about the Mlir-commits mailing list