[PATCH] D68146: [FileCheck] Implement --ignore-case option.

Jordan Rupprecht via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 9 15:34:16 PDT 2019


rupprecht added a comment.

Mostly LGTM, just a couple test nits. Thanks for fixing FileCheck!

In D68146#1701152 <https://reviews.llvm.org/D68146#1701152>, @Kai wrote:

> In D68146#1691246 <https://reviews.llvm.org/D68146#1691246>, @MaskRay wrote:
>
> > To make it really `--ignore-case`, the pattern should also be changed to lowercase.
>
>
> I am not sure which pattern I have missed. The fixed string match uses the lowercase find and the regex match uses the Regex::IgnoreCase flag.


`StringRef::find_lower()` is a bad name for something that should really be called `StringRef::find_case_insensitive()`, which I think is the confusion here.



================
Comment at: llvm/test/FileCheck/check-ignore-case.txt:1
+# RUN: FileCheck -ignore-case -match-full-lines -check-prefix=FULL -input-file %s %s
+# RUN: FileCheck -ignore-case -check-prefix=REGEX -input-file %s %s
----------------
Can you split up these lines with descriptions of what each one does? e.g.
```
## Check that ...
# RUN: FileCheck ...

## Check that other thing ...
# RUN: FileCheck ...
```


================
Comment at: llvm/test/FileCheck/check-ignore-case.txt:5
+# RUN: FileCheck -ignore-case -input-file %s %s
+
+this is the STRING to be matched
----------------
Can you add a check that case is ignored for `-implicit-check-not`? e.g. `not FileCheck -ignore-case -implicit-check-not=sTrinG`


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

https://reviews.llvm.org/D68146





More information about the llvm-commits mailing list