[Mlir-commits] [mlir] [mlir][Func] Fix FuncOp verifier ordering via hasRegionVerifier (PR #184612)
Matthias Springer
llvmlistbot at llvm.org
Wed Mar 4 06:36:07 PST 2026
================
@@ -0,0 +1,12 @@
+// After moving the return-type checks from FuncOp::verify() to
+// FuncOp::verifyRegions() (hasRegionVerifier=1), the terminator is verified
+// first and emits a clean diagnostic instead of crashing.
+//
+// RUN: mlir-opt %s -split-input-file -verify-diagnostics
+
+// -----
+
+func.func @func_verifier_runs_before_region() -> () {
----------------
matthias-springer wrote:
nit: I would put this test in `Func/invalid.mlir`.
https://github.com/llvm/llvm-project/pull/184612
More information about the Mlir-commits
mailing list