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

Fangrui Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 10 03:10:25 PDT 2019


MaskRay added inline comments.


================
Comment at: llvm/test/FileCheck/check-ignore-case.txt:1
+## Check that a full line is matched independent case
+# RUN: FileCheck -ignore-case -match-full-lines -check-prefix=FULL -input-file %s %s
----------------
`independent of case`. Or, how about `case insensitively`?

Please also add full stops in these comments.


================
Comment at: llvm/test/FileCheck/check-ignore-case.txt:5
+## Check that a regular expression matches independent of case
+# RUN: FileCheck -ignore-case -check-prefix=REGEX -input-file %s %s
+
----------------
`-input-file=%s` makes it clear `-input-file` accepts an argument.

I think @jhenderson may prefer `--input-file=%s`. Binary utilities (almost) exclusively use double-dashed forms now.

One bad thing with `-input-file` is that it is incompatible with POSIX Utility Syntax Guideline 5 (grouped options). Though FileCheck is not a POSIX utility and it does not necessarily abide by the rules...


================
Comment at: llvm/test/FileCheck/check-ignore-case.txt:17
+## Check that implicit-not works independent of case
+# RUN: sed 's/^#.*//' %s | FileCheck -implicit-check-not=sTrInG %s
+# RUN: sed 's/^#.*//' %s | not FileCheck -ignore-case -implicit-check-not=sTrInG %s 2>&1 | FileCheck -check-prefix=ERROR %s
----------------
sed `/^#/d`


================
Comment at: llvm/test/FileCheck/check-ignore-case.txt:43
+
+# ERROR: command line:1:22: error: CHECK-NOT: excluded string found in input
+# ERROR-NEXT: -implicit-check-not='sTrInG'
----------------
Consider using a regex for 22.


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

https://reviews.llvm.org/D68146





More information about the llvm-commits mailing list