[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 04:55:34 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:
I wonder if using regex is a better approach. e.g.,
```
// ELF-NOT: {{\bbar\b}}
// ELF-NOT: {{\bfoo\b}}
```
WDYT?
https://github.com/llvm/llvm-project/pull/145455
More information about the cfe-commits
mailing list