-
Notifications
You must be signed in to change notification settings - Fork 14.3k
[FileCheck][Docs] Fix regex for FileCheck variable names #97301
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
@llvm/pr-subscribers-testing-tools Author: Anton Lydike (AntonLydike) ChangesThis fixes a minor oversight in the FileCheck documentation on what is considered a valid variable name. Global variables are prefixed with a Full diff: https://github.com/llvm/llvm-project/pull/97301.diff 1 Files Affected:
diff --git a/llvm/docs/CommandGuide/FileCheck.rst b/llvm/docs/CommandGuide/FileCheck.rst
index 432dafa100bfd..af4930409da1a 100644
--- a/llvm/docs/CommandGuide/FileCheck.rst
+++ b/llvm/docs/CommandGuide/FileCheck.rst
@@ -731,7 +731,7 @@ The first check line matches a regex ``%[a-z]+`` and captures it into the
string variable ``REGISTER``. The second line verifies that whatever is in
``REGISTER`` occurs later in the file after an "``andw``". :program:`FileCheck`
string substitution blocks are always contained in ``[[ ]]`` pairs, and string
-variable names can be formed with the regex ``[a-zA-Z_][a-zA-Z0-9_]*``. If a
+variable names can be formed with the regex ``\$[a-zA-Z_][a-zA-Z0-9_]*``. If a
colon follows the name, then it is a definition of the variable; otherwise, it
is a substitution.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks!
@RoboTux sorry, new to all of this, the windows build failure seems not related to this change, can I just merge or should I rebase and re-run CI? |
You can merge. Keep an eye out for buildbot notifications. |
LLVM Buildbot has detected a new failure on builder Full details are available at: https://lab.llvm.org/buildbot/#/builders/159/builds/1226 Here is the relevant piece of the build log for the reference:
|
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.
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.
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.