[compiler-rt] Fix test's FileCheck match to allow a column number in message. (PR #195356)

James Y Knight via llvm-commits llvm-commits at lists.llvm.org
Fri May 1 14:06:30 PDT 2026


https://github.com/jyknight created https://github.com/llvm/llvm-project/pull/195356

In some cases, the cfi diagnostic is emitted with a column
number. Allow that in the test.

>From 1096ce0244aa8b3b08c9b75b5eaaa322c18a8695 Mon Sep 17 00:00:00 2001
From: James Y Knight <jyknight at google.com>
Date: Fri, 1 May 2026 17:03:13 -0400
Subject: [PATCH] Fix test's FileCheck match to allow a column number in
 message.

In some cases, the cfi diagnostic is emitted with a column
number. Allow that in the test.
---
 compiler-rt/test/cfi/icall/bad-signature.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/compiler-rt/test/cfi/icall/bad-signature.c b/compiler-rt/test/cfi/icall/bad-signature.c
index 044c0e0f3cb4f..93f2c5797bda6 100644
--- a/compiler-rt/test/cfi/icall/bad-signature.c
+++ b/compiler-rt/test/cfi/icall/bad-signature.c
@@ -17,7 +17,7 @@ int main() {
   fprintf(stderr, "1\n");
 
   // CFI-DIAG: runtime error: control flow integrity check for type 'void (int)' failed during indirect function call
-  // CFI-DIAG: bad-signature.c:[[@LINE-8]]: note: f defined here
+  // CFI-DIAG: bad-signature.c:[[@LINE-8]]{{(:[0-9]+)?}}: note: f defined here
   ((void (*)(int))f)(42); // UB here
 
   // CFI-NOT: 2



More information about the llvm-commits mailing list