[PATCH] D79253: [docs][FileCheck] Fix invalid example

Thomas Preud'homme via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri May 1 17:15:58 PDT 2020


thopre created this revision.
thopre added reviewers: jhenderson, jdenny, probinson, grimar, arichardson, MaskRay.
Herald added a project: LLVM.
MaskRay accepted this revision.
MaskRay added a comment.
This revision is now accepted and ready to land.

LGTM. I remember you have a large patch series improving FileCheck. How many have landed now? If not all have landed, what is blocking the remaining changes?


FileCheck documentation contains an example of a numeric variable
defined and used on the same line. This is not currently supported by
FileCheck so this commit fixes the example to use CHECK-SAME for the
variable use.

Test Plan: copy/pasted the example and tested with FileCheck without
this patch (failed) and with (succeeded).


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D79253

Files:
  llvm/docs/CommandGuide/FileCheck.rst


Index: llvm/docs/CommandGuide/FileCheck.rst
===================================================================
--- llvm/docs/CommandGuide/FileCheck.rst
+++ llvm/docs/CommandGuide/FileCheck.rst
@@ -634,7 +634,8 @@
 
     ; CHECK: load r[[#REG:]], [r0]
     ; CHECK: load r[[#REG+1]], [r1]
-    ; CHECK: Loading from 0x[[#%x,ADDR:] to 0x[[#ADDR + 7]]
+    ; CHECK: Loading from 0x[[#%x,ADDR:]]
+    ; CHECK-SAME: to 0x[[#ADDR + 7]]
 
 The above example would match the text:
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D79253.261507.patch
Type: text/x-patch
Size: 476 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200502/1d472a0a/attachment-0001.bin>


More information about the llvm-commits mailing list