blob: d742b6b0cfe33b0577b39d5307bef0d05fdfd78b [file] [log] [blame]
; TODO(andydavis) Resolve relative path issue w.r.t invoking mlir-opt in RUN
; statements (perhaps through using lit config substitutions).
;
; RUN: %S/../../mlir-opt %s -o - -check-parser-errors
; Check different error cases.
; -----
extfunc @illegaltype(i42) ; expected-error {{expected type}}
; -----
extfunc @nestedtensor(tensor<tensor<i8>>) -> () ; expected-error {{expected type}}
; -----
cfgfunc @foo()
cfgfunc @bar() ; expected-error {{expected '{' in CFG function}}
; -----
extfunc missingsigil() -> (i1, int, f32) ; expected-error {{expected a function identifier like}}
; -----
cfgfunc @bad_branch() {
bb42:
br missing ; expected-error {{reference to an undefined basic block 'missing'}}
}
; -----
cfgfunc @block_redef() {
bb42:
return
bb42: ; expected-error {{redefinition of block 'bb42'}}
return
}
; -----
cfgfunc @no_terminator() {
bb40:
return
bb41:
bb42: ; expected-error {{expected terminator}}
return
}