[Mlir-commits] [mlir] [mlir][AsmParser] Fix comment detection in string literals (PR #174125)

Jakub Kuderski llvmlistbot at llvm.org
Thu Jan 15 07:23:34 PST 2026


================
@@ -0,0 +1,10 @@
+// RUN: not mlir-opt -allow-unregistered-dialect %s 2>&1 | FileCheck %s
+
+// Test that '//' in a string literal doesn't confuse comment detection when
+// backing up to position an error. The error should point to the end of the
+// line (column 54), not at the '//' inside the string (column 28).
+
+// CHECK: {{.*}}:[[# @LINE + 2]]:54: error: expected operation name in quotes
----------------
kuhar wrote:

Can we check this with `--verify-diagnostics` instead of looking at stderr directly?

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


More information about the Mlir-commits mailing list