[PATCH] D68061: [docs] Document pattern of using CHECK-SAME to skip irrelevant lines

Fangrui Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 26 02:05:18 PDT 2019


MaskRay added inline comments.


================
Comment at: llvm/docs/CommandGuide/FileCheck.rst:335-336
+
+This verifies that the *next* line that contains "``Value:``" has the value
+``1``.
+
----------------
jhenderson wrote:
> Maybe this would be better phrased as "This verifies that the next time "``Value:``" appears in the output, it has a value of 1.
> 
> It might also be worth a note saying to use `{{$}}` immediately after too, to avoid a spurious match on `Value: 16` or similar. Not sure if it really belongs here, or somewhere else though.
The suggestion looks good. So the example should be 

```
CHECK:      Value:
CHECK-SAME:        1{{$}}
```



Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D68061/new/

https://reviews.llvm.org/D68061





More information about the llvm-commits mailing list