Skip to content

Commit 54953b9

Browse files
authored
Handle vendor string in match for clang version string (#145612)
#145455 failed to account for the optional "vendor string" that precedes the `clang version` in the Clang version string metadata. I just updated it to use a regex to allow arbitrary content before the `clang version`. Tested this both with and without a vendor string, and it seems to work as expected.
1 parent 630d55c commit 54953b9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

clang/test/CodeGen/pragma-comment.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,4 +34,4 @@
3434
// ELF-NOT: foo
3535
// This following match prevents the clang version metadata from matching the forbidden 'foo' and 'bar' tokens.
3636
// This can happen if the clang version string contains a Git repo URL that includes one of those substrings.
37-
// ELF-LABEL: !"clang version
37+
// ELF-LABEL: {{\!\".*clang version}}

0 commit comments

Comments
 (0)