Modernize some of the existing custom parsing code in the LLVM dialect.
While this reduces some boilerplate code, it also reduces the precision
of the diagnostic error messges.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
I'm not sure this is a net-win because of the less effective error messages, but I thought I'd submit this and see what happens.
mlir/test/Dialect/LLVMIR/invalid.mlir | ||
---|---|---|
203 | Random note, it'd be nice to fix this error message to be a bit more helpful(not in this revision). We could likely use llvm::getTypeName<AttrT> inside of the parser to at least give the expected attribute class name. |
Unit tests: pass. 61987 tests passed, 0 failed and 783 were skipped.
clang-tidy: unknown.
clang-format: fail. Please format your changes with clang-format by running git-clang-format HEAD^ or applying this patch.
Build artifacts: diff.json, clang-format.patch, CMakeCache.txt, console-log.txt, test-results.xml
See my other comment. I think we can easily fixup the error messages to be more effective, by:
a) Using the attribute name in the message
b) Using llvm::getTypeName<> to print the c++ type of the expected attribute
Unit tests: pass. 61987 tests passed, 0 failed and 783 were skipped.
clang-tidy: unknown.
clang-format: pass.
Build artifacts: diff.json, clang-format.patch, CMakeCache.txt, console-log.txt, test-results.xml
Random note, it'd be nice to fix this error message to be a bit more helpful(not in this revision). We could likely use llvm::getTypeName<AttrT> inside of the parser to at least give the expected attribute class name.