[all-commits] [llvm/llvm-project] 6609c1: [mlir] Add a better error message when failing to ...
River Riddle via All-commits
all-commits at lists.llvm.org
Thu May 5 15:07:06 PDT 2022
Author: River Riddle <riddleriver at gmail.com>
Date: 2022-05-05 (Thu, 05 May 2022)
[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
More information about the All-commits