aboutsummaryrefslogtreecommitdiff
path: root/llvm/docs/CommandGuide/FileCheck.rst
diff options
context:
space:
mode:
authorAlex Richardson <Alexander.Richardson@cl.cam.ac.uk>2020-05-27 15:13:42 +0100
committerAlex Richardson <Alexander.Richardson@cl.cam.ac.uk>2020-05-27 16:31:39 +0100
commit3be5e53f208d63135bb4e8499abdc1ac8a2b3266 (patch)
tree9ff1a65cad37aa549f62150d86d6ecb88ea377c4 /llvm/docs/CommandGuide/FileCheck.rst
parent461af57de78155ee5d1dc1969b81dd019d228538 (diff)
downloadllvm-3be5e53f208d63135bb4e8499abdc1ac8a2b3266.zip
llvm-3be5e53f208d63135bb4e8499abdc1ac8a2b3266.tar.gz
llvm-3be5e53f208d63135bb4e8499abdc1ac8a2b3266.tar.bz2
[FileCheck] Allow parenthesized expressions
With this change it is be possible to write FileCheck expressions such as [[#(VAR+1)-2]]. Currently, the only supported arithmetic operators are plus and minus, so this is not particularly useful yet. However, it our CHERI fork we have tests that benefit from having multiplication in FileCheck expressions. Allowing parenthesized expressions is the simplest way for us to work around the current lack of operator precedence in FileCheck expressions. Reviewed By: thopre, jhenderson Differential Revision: https://reviews.llvm.org/D77383
Diffstat (limited to 'llvm/docs/CommandGuide/FileCheck.rst')
-rw-r--r--llvm/docs/CommandGuide/FileCheck.rst2
1 files changed, 2 insertions, 0 deletions
diff --git a/llvm/docs/CommandGuide/FileCheck.rst b/llvm/docs/CommandGuide/FileCheck.rst
index 7d9a69e..d8a2e34 100644
--- a/llvm/docs/CommandGuide/FileCheck.rst
+++ b/llvm/docs/CommandGuide/FileCheck.rst
@@ -694,6 +694,8 @@ The syntax of a numeric substitution is ``[[#%<fmtspec>,<expr>]]`` where:
A numeric operand is a previously defined numeric variable, or an integer
literal. The supported operators are ``+`` and ``-``. Spaces are accepted
before, after and between any of these elements.
+ There is currently no support for operator precendence, but parentheses can
+ be used to change the evaluation order.
For example: