https://github.com/dbartol created https://github.com/llvm/llvm-project/pull/145455
Sometimes the forbidden text `foo` or `bar` could appear in the Clang version string metadata. Treating the version string as a `CHECK-LABEL:` prevents this. Fixes #145453 >From 252441c2a828d9bda1d74cec2f1f37b29348e92f Mon Sep 17 00:00:00 2001 From: Dave Bartolomeo <dave_bartolo...@apple.com> Date: Mon, 23 Jun 2025 23:55:27 -0400 Subject: [PATCH] Fix `pragma-comment.c` test failing on false match Sometimes the forbidden text `foo` or `bar` could appear in the Clang version string metadata. Treating the version string as a `CHECK-LABEL:` prevents this. --- clang/test/CodeGen/pragma-comment.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/clang/test/CodeGen/pragma-comment.c b/clang/test/CodeGen/pragma-comment.c index a966840f7c26f..861fba9aece3b 100644 --- a/clang/test/CodeGen/pragma-comment.c +++ b/clang/test/CodeGen/pragma-comment.c @@ -32,3 +32,6 @@ // ELF: ![[space]] = !{!"with space"} // ELF-NOT: bar // ELF-NOT: foo +// This following match prevents the clang version metadata from matching the forbidden 'foo' and 'bar' tokens. +// This can happen if the clang version string contains a Git repo URL that includes one of those substrings. +// ELF-LABEL: !"clang version _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits