Skip to content

Commit 9e33cb2

Browse files
authored
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
1 parent 52fee55 commit 9e33cb2

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

clang/test/CodeGen/pragma-comment.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,3 +32,6 @@
3232
// ELF: ![[space]] = !{!"with space"}
3333
// ELF-NOT: bar
3434
// ELF-NOT: foo
35+
// This following match prevents the clang version metadata from matching the forbidden 'foo' and 'bar' tokens.
36+
// This can happen if the clang version string contains a Git repo URL that includes one of those substrings.
37+
// ELF-LABEL: !"clang version

0 commit comments

Comments
 (0)