[Mlir-commits] [mlir] [mlir][Parser] Fix crash after block parsing failure (PR #128011)

Matthias Springer llvmlistbot at llvm.org
Thu Feb 20 23:46:47 PST 2025


================
@@ -675,3 +675,17 @@ func.func @error_at_end_of_line() {
 // -----
 
 @foo   // expected-error {{expected operation name in quotes}}
+
+// -----
+
+func.func @drop_references_on_block_parse_error(){
+  "test.user"(%i, %1) : (index, index) -> ()
+  "test.op_with_region"() ({
+  ^bb0(%i : index):
+    // expected-error @below{{expected operation name in quotes}}
----------------
matthias-springer wrote:

That issue is unrelated to this PR. It it seems to be a lexer error. The token at which the error is produced is `123`, but its location is right before the new-line character. I'm looking into this separately.


https://github.com/llvm/llvm-project/pull/128011


More information about the Mlir-commits mailing list