aboutsummaryrefslogtreecommitdiff
path: root/llvm/docs/CommandGuide/FileCheck.rst
diff options
context:
space:
mode:
authorPaul Robinson <paul.robinson@sony.com>2019-08-02 16:07:48 +0000
committerPaul Robinson <paul.robinson@sony.com>2019-08-02 16:07:48 +0000
commit89683e9dd7db4693061b765923518cc040842ecf (patch)
tree66084ac10f6f2310d96d6b673d0d2cdb55751006 /llvm/docs/CommandGuide/FileCheck.rst
parent08b72f0d4161e8c59af6ca29c0c18886a1f724f9 (diff)
downloadllvm-89683e9dd7db4693061b765923518cc040842ecf.zip
llvm-89683e9dd7db4693061b765923518cc040842ecf.tar.gz
llvm-89683e9dd7db4693061b765923518cc040842ecf.tar.bz2
[doc] Give a workaround for a FileCheck regex that ends in a brace.
Addresses PR42864. llvm-svn: 367689
Diffstat (limited to 'llvm/docs/CommandGuide/FileCheck.rst')
-rw-r--r--llvm/docs/CommandGuide/FileCheck.rst5
1 files changed, 4 insertions, 1 deletions
diff --git a/llvm/docs/CommandGuide/FileCheck.rst b/llvm/docs/CommandGuide/FileCheck.rst
index c5521e4..429f3ad 100644
--- a/llvm/docs/CommandGuide/FileCheck.rst
+++ b/llvm/docs/CommandGuide/FileCheck.rst
@@ -527,7 +527,10 @@ Because regular expressions are enclosed with double braces, they are
visually distinct, and you don't need to use escape characters within the double
braces like you would in C. In the rare case that you want to match double
braces explicitly from the input, you can use something ugly like
-``{{[{][{]}}`` as your pattern.
+``{{[}][}]}}`` as your pattern. Or if you are using the repetition count
+syntax, for example ``[[:xdigit:]]{8}`` to match exactly 8 hex digits, you
+would need to add parentheses like this ``{{([[:xdigit:]]{8})}}`` to avoid
+confusion with FileCheck's closing double-brace.
FileCheck String Substitution Blocks
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~