[PATCH] D77449: [MLIR] Cleanup mlir-tblgen error messages for custom assembly formats.
River Riddle via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Apr 3 19:30:32 PDT 2020
rriddle requested changes to this revision.
rriddle added inline comments.
This revision now requires changes to proceed.
================
Comment at: mlir/tools/mlir-tblgen/OpFormatGen.cpp:1340
if (!hasAttrDict)
- return emitError(loc, "format missing 'attr-dict' directive");
+ return emitError(loc, "format missing 'attr-dict' directive.");
----------------
Remove the punctuation.
================
Comment at: mlir/tools/mlir-tblgen/OpFormatGen.cpp:1380
if (!builder || result.constraint.isVariadic()) {
- return emitError(loc, "format missing instance of result #" + Twine(i) +
- "('" + result.name + "') type");
+ return emitError(loc, "Type of result #" + Twine(i) +
+ ", named '" + result.name +
----------------
Diagnostics should start with lower case letters.
================
Comment at: mlir/tools/mlir-tblgen/OpFormatGen.cpp:1383
+ "', is not buildable and a buildable type cannot " +
+ "be inferred from other types. Suggest adding a " +
+ "type constraint to the operation or adding a " +
----------------
If we are going to have suggestions, they should likely be notes instead of lumped together with the error message.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D77449/new/
https://reviews.llvm.org/D77449
More information about the llvm-commits
mailing list