aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDave Bartolomeo <dave_bart+dbartol@outlook.com>2025-06-24 14:11:20 -0400
committerGitHub <noreply@github.com>2025-06-24 14:11:20 -0400
commit9e33cb22f991fb25d606d89c0e5a13a3ebed52fe (patch)
tree647b82440770af26dc1d9712c146ec3fa93a045d
parent52fee553a5412370638ba61b2c9c481ca0e1315a (diff)
downloadllvm-9e33cb22f991fb25d606d89c0e5a13a3ebed52fe.zip
llvm-9e33cb22f991fb25d606d89c0e5a13a3ebed52fe.tar.gz
llvm-9e33cb22f991fb25d606d89c0e5a13a3ebed52fe.tar.bz2
Fix `pragma-comment.c` test failing on false match (#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
-rw-r--r--clang/test/CodeGen/pragma-comment.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/clang/test/CodeGen/pragma-comment.c b/clang/test/CodeGen/pragma-comment.c
index a966840..861fba9 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