Skip to content

Commit 6ad82fc

Browse files
authored
[FileCheck][Docs] Fix regex for FileCheck variable names (#97301)
This fixes a minor oversight in the FileCheck documentation on what is considered a valid variable name. Global variables are prefixed with a `$`, which is explained two paragraphs below, but this was omitted in the presented regex in this paragraph.
1 parent b7e157c commit 6ad82fc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

llvm/docs/CommandGuide/FileCheck.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -731,7 +731,7 @@ The first check line matches a regex ``%[a-z]+`` and captures it into the
731731
string variable ``REGISTER``. The second line verifies that whatever is in
732732
``REGISTER`` occurs later in the file after an "``andw``". :program:`FileCheck`
733733
string substitution blocks are always contained in ``[[ ]]`` pairs, and string
734-
variable names can be formed with the regex ``[a-zA-Z_][a-zA-Z0-9_]*``. If a
734+
variable names can be formed with the regex ``\$[a-zA-Z_][a-zA-Z0-9_]*``. If a
735735
colon follows the name, then it is a definition of the variable; otherwise, it
736736
is a substitution.
737737

0 commit comments

Comments
 (0)