1 // RUN: mlir-opt %s -split-input-file -verify-diagnostics
5 func.func @location_missing_l_paren() {
7 return loc) // expected-error {{expected '(' in location}}
12 func.func @location_missing_r_paren() {
14 return loc(unknown // expected-error {{expected ')' in location}}
19 func.func @location_invalid_instance() {
21 return loc() // expected-error {{expected location instance}}
26 func.func @location_name_missing_r_paren() {
28 return loc("foo"(unknown]) // expected-error {{expected ')' after child location of NameLoc}}
33 func.func @location_callsite_missing_l_paren() {
35 return loc(callsite unknown // expected-error {{expected '(' in callsite location}}
40 func.func @location_callsite_missing_callee() {
42 return loc(callsite( at ) // expected-error {{expected location instance}}
47 func.func @location_callsite_missing_at() {
49 return loc(callsite(unknown unknown) // expected-error {{expected 'at' in callsite location}}
54 func.func @location_callsite_missing_caller() {
56 return loc(callsite(unknown at ) // expected-error {{expected location instance}}
61 func.func @location_callsite_missing_r_paren() {
63 return loc(callsite( unknown at unknown // expected-error {{expected ')' in callsite location}}
68 func.func @location_fused_missing_greater() {
70 return loc(fused<true [unknown]) // expected-error {{expected '>' after fused location metadata}}
75 func.func @location_fused_missing_metadata() {
77 // expected-error@+1 {{expected attribute value}}
83 func.func @location_fused_missing_l_square() {
85 return loc(fused<true>unknown]) // expected-error {{expected '[' in fused location}}
90 func.func @location_fused_missing_r_square() {
92 return loc(fused[unknown) // expected-error {{expected ']' in fused location}}
97 func.func @location_invalid_alias() {
98 // expected-error@+1 {{operation location alias was never defined}}
99 return loc(#invalid_alias)
104 func.func @location_invalid_alias() {
105 // expected-error@+1 {{expected location, but found 'true'}}