[Mlir-commits] [mlir] [mlir] Add nullptr checks in SparseElementsAttr parser (PR #133222)
Mehdi Amini
llvmlistbot at llvm.org
Thu Mar 27 02:41:10 PDT 2025
================
@@ -109,6 +109,14 @@ func.func @invalid_tensor_literal() {
// -----
+func.func @invalid_tensor_literal() {
+ // expected-error @+2 {{unexpected decimal integer literal for a floating point value}}
+ // expected-note @+1 {{add a trailing dot to make the literal a float}}
+ "foo"(){bar = sparse<[0, 0], 0101> : tensor<1xf16>} : () -> ()
+}
+
+// -----
+
----------------
joker-eph wrote:
You added two null checks, I would think you'd need two tests?
https://github.com/llvm/llvm-project/pull/133222
More information about the Mlir-commits
mailing list