blob: 774af059438170932e88440396c43ae3be32e1f8 [file] [edit]
// RUN: mlir-opt %s -split-input-file -verify-diagnostics
// expected-error@+2 {{invalid dimension}}
// expected-error@+1 {{custom op 'test.custom_dimension_list_attr' Failed parsing dimension list.}}
test.custom_dimension_list_attr dimension_list = 1x-1
// -----
// expected-error@+1 {{custom op 'test.custom_dimension_list_attr' Failed parsing dimension list. Did you mean an empty list? It must be denoted by "[]".}}
test.custom_dimension_list_attr dimension_list = -1
// -----
// expected-error@+2 {{expected ']'}}
// expected-error@+1 {{custom op 'test.custom_dimension_list_attr' Failed parsing dimension list.}}
test.custom_dimension_list_attr dimension_list = [2x3]
// -----
// expected-error @below {{expected attribute value}}
test.optional_custom_attr foo
// -----
// expected-error @below {{unknown key '"foo"' when parsing properties dictionary}}
test.op_with_enum_prop_attr_form <{value = 0 : i32, foo}>
// -----
// Test that an integer literal cannot be used where an APFloat is expected.
// parseOptionalAttribute(FloatAttr &) should reject a non-float attribute.
// expected-error@+2 {{expected attribute of type 'builtin.float', but found attribute '5 : i64'}}
// expected-error@+1 {{failed to parse TestTypeAPFloat parameter}}
func.func private @test_ap_float_wrong_attr_type() -> !test.ap_float<5U0>