Changeset View
Changeset View
Standalone View
Standalone View
mlir/test/mlir-tblgen/op-format-invalid.td
Show First 20 Lines • Show All 363 Lines • ▼ Show 20 Lines | |||||
// CHECK: error: only literals, types, and variables can be used within an optional group | // CHECK: error: only literals, types, and variables can be used within an optional group | ||||
def OptionalInvalidE : TestFormat_Op<[{ | def OptionalInvalidE : TestFormat_Op<[{ | ||||
(`,` $attr^ type(operands))? attr-dict | (`,` $attr^ type(operands))? attr-dict | ||||
}]>, Arguments<(ins OptionalAttr<I64Attr>:$attr)>; | }]>, Arguments<(ins OptionalAttr<I64Attr>:$attr)>; | ||||
// CHECK: error: only one element can be marked as the anchor of an optional group | // CHECK: error: only one element can be marked as the anchor of an optional group | ||||
def OptionalInvalidF : TestFormat_Op<[{ | def OptionalInvalidF : TestFormat_Op<[{ | ||||
($attr^ $attr2^)? attr-dict | ($attr^ $attr2^)? attr-dict | ||||
}]>, Arguments<(ins OptionalAttr<I64Attr>:$attr, OptionalAttr<I64Attr>:$attr2)>; | }]>, Arguments<(ins OptionalAttr<I64Attr>:$attr, OptionalAttr<I64Attr>:$attr2)>; | ||||
// CHECK: error: only optional attributes can be used to anchor an optional group | // CHECK: error: only optional or default-valued attributes can be used to anchor an optional group | ||||
def OptionalInvalidG : TestFormat_Op<[{ | def OptionalInvalidG : TestFormat_Op<[{ | ||||
($attr^)? attr-dict | ($attr^)? attr-dict | ||||
}]>, Arguments<(ins I64Attr:$attr)>; | }]>, Arguments<(ins I64Attr:$attr)>; | ||||
// CHECK: error: only variable length operands can be used within an optional group | // CHECK: error: only variable length operands can be used within an optional group | ||||
def OptionalInvalidH : TestFormat_Op<[{ | def OptionalInvalidH : TestFormat_Op<[{ | ||||
($arg^)? attr-dict | ($arg^)? attr-dict | ||||
}]>, Arguments<(ins I64:$arg)>; | }]>, Arguments<(ins I64:$arg)>; | ||||
// CHECK: error: only literals, types, and variables can be used within an optional group | // CHECK: error: only literals, types, and variables can be used within an optional group | ||||
▲ Show 20 Lines • Show All 146 Lines • Show Last 20 Lines |