xref: /llvm-project/mlir/test/IR/diagnostic-handler-verify-regex.mlir (revision 7306dc91e091421779b5a28fde8dad6aa73aa56f)
1// RUN: not mlir-opt -allow-unregistered-dialect %s -split-input-file -verify-diagnostics 2>&1 | FileCheck %s
2
3// CHECK: found start of regex with no end '}}'
4// expected-error-re {{{{}}
5
6// -----
7
8// CHECK: invalid regex: parentheses not balanced
9// expected-error-re {{ {{(}} }}
10
11// -----
12
13func.func @foo() -> i32 {
14  // expected-error-re@+1 {{'func.return' op has 0 operands, but enclosing function (@{{.*}}) returns 1}}
15  return
16}
17