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

Aart Bik llvmlistbot at llvm.org
Mon Nov 13 10:44:22 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:

ah, I see. it just looked strange on some, but not all occurrences; but if the compiler tells you to do so, no choice ;-)

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


More information about the Mlir-commits mailing list