From 94e08dd8fd284b7ea6804f1d6e62e8dece48bd6d Mon Sep 17 00:00:00 2001 From: Paul Robinson Date: Fri, 2 Aug 2019 16:07:48 +0000 Subject: [PATCH] [doc] Give a workaround for a FileCheck regex that ends in a brace. Addresses PR42864. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@367689 91177308-0d34-0410-b5e6-96231b3b80d8 --- docs/CommandGuide/FileCheck.rst | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/docs/CommandGuide/FileCheck.rst b/docs/CommandGuide/FileCheck.rst index c5521e4e9bd..429f3ad07d7 100644 --- a/docs/CommandGuide/FileCheck.rst +++ b/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 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -- 2.49.0