[llvm] r367689 - [doc] Give a workaround for a FileCheck regex that ends in a brace.
Paul Robinson via llvm-commits
llvm-commits at lists.llvm.org
Fri Aug 2 09:07:48 PDT 2019
Author: probinson
Date: Fri Aug 2 09:07:48 2019
New Revision: 367689
URL: http://llvm.org/viewvc/llvm-project?rev=367689&view=rev
Log:
[doc] Give a workaround for a FileCheck regex that ends in a brace.
Addresses PR42864.
Modified:
llvm/trunk/docs/CommandGuide/FileCheck.rst
Modified: llvm/trunk/docs/CommandGuide/FileCheck.rst
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/CommandGuide/FileCheck.rst?rev=367689&r1=367688&r2=367689&view=diff
==============================================================================
--- llvm/trunk/docs/CommandGuide/FileCheck.rst (original)
+++ llvm/trunk/docs/CommandGuide/FileCheck.rst Fri Aug 2 09:07:48 2019
@@ -527,7 +527,10 @@ Because regular expressions are enclosed
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
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
More information about the llvm-commits
mailing list