[PATCH] D77293: [mlir][DeclarativeParser] Emit an error if a `:` follows an attribute with a non-constant type.

River Riddle via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 2 03:13:53 PDT 2020


rriddle created this revision.
rriddle added a reviewer: lattner.
Herald added subscribers: llvm-commits, grosul1, Joonsoo, liufengdb, aartbik, lucyrfox, mgester, arpith-jacob, nicolasvasilache, antiagainst, shauheen, burmako, jpienaar, mehdi_amini.
Herald added a reviewer: antiagainst.
Herald added a project: LLVM.

The attribute grammar includes an optional trailing colon type, so for attributes without a constant buildable type this will generally lead to unexpected and undesired behavior. Given that, it's better to just error out on these cases.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D77293

Files:
  mlir/include/mlir/Dialect/Affine/IR/AffineOpsBase.td
  mlir/include/mlir/IR/OpBase.td
  mlir/test/IR/attribute.mlir
  mlir/test/lib/Dialect/Test/TestOps.td
  mlir/test/mlir-tblgen/op-format-spec.td
  mlir/tools/mlir-tblgen/OpFormatGen.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D77293.254467.patch
Type: text/x-patch
Size: 16898 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200402/65d6d423/attachment.bin>


More information about the llvm-commits mailing list