[mlir] Add a better error message when failing to parse an attribute
The fallback attribute parse path is parsing a Type attribute, but this results in a really unintuitive error message: `expected non-function type`, which doesn't really hint at tall that we were trying to parse an attribute. This commit fixes this by trying to optionally parse a type, and on failure emitting an error that we were expecting an attribute. Differential Revision: https://reviews.llvm.org/D124870
Loading
Please sign in to comment