[Mlir-commits] [mlir] [mlir] Fix copy paste typo in convertFromAttribute (PR #192484)
llvmlistbot at llvm.org
llvmlistbot at llvm.org
Thu Apr 16 22:47:40 PDT 2026
================
@@ -103,7 +103,7 @@ mlir::convertFromAttribute(bool &storage, Attribute attr,
auto valueAttr = dyn_cast<BoolAttr>(attr);
if (!valueAttr)
return emitError()
- << "expected string property to come from string attribute";
+ << "expected BoolAttr for key `value`";
----------------
janssen-v wrote:
After seeing the error messages in action while writing the tests, ultimately I think that the "key `value`" error message used in all overloads should be replaced with something more descriptive.
```mlir
"test.with_properties"() <{b = "foo", a = "bar"}> : () -> ()
// [CURRENT]: invalid properties {a = "bar", b = "foo"} for op test.with_properties: expected IntegerAttr for key `value`
// [PROPOSED]: invalid properties {a = "bar", b = "foo"} for op test.with_properties: expected IntegerAttr for attribute `a`.
```
Although this goes beyond the scope of the original copy paste typo fix, I believe that this would be the best course.
https://github.com/llvm/llvm-project/pull/192484
More information about the Mlir-commits
mailing list