[clang] Fix `pragma-comment.c` test failing on false match (PR #145455)

Aaron Ballman via cfe-commits cfe-commits at lists.llvm.org
Tue Jun 24 10:27:10 PDT 2025


================
@@ -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
----------------
AaronBallman wrote:

Okay, that's compelling logic, thank you!

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


More information about the cfe-commits mailing list