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

Nick Kreeger llvmlistbot at llvm.org
Thu Jan 15 07:51:37 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
----------------
nkreeger wrote:

Yep! Done :-)

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


More information about the Mlir-commits mailing list